Hi All,<br><br>Can someone more familiar with TableGen take a quick look at this patch? It's intended to ensure that REP_MOV* instructions use the RSI/RDI/RCX registers in 64bit mode, and ESI/EDI/ECX registers in 32bit mode. Similar use fixes apply for the REP_STO* instructions.<br>
<br>This prevents isel from inserting some strange copies to deal with the mismatched operand sizes in 64bit mode. E.g.<br><br>Old code:<br><br><font class="Apple-style-span" face="'courier new', monospace">%vreg1<def> = MOV64ri64i32 32; GR64:%vreg1<br>
...<br>%RCX<def,dead> = COPY %vreg1<kill>, %ECX<imp-def>; GR64:%vreg1<br>...<br>REP_MOVSD %ECX<imp-def,dead>, %EDI<imp-def,dead>, %ESI<imp-def,dead>, %ECX<imp-use,kill>, %EDI<imp-use,kill,undef>, %ESI<imp-use,kill><br>
</font><br>With this patch applied the code comes out as:<br><br><font class="Apple-style-span" face="'courier new', monospace">%vreg1<def> = MOV64ri64i32 32; GR64:%vreg1<br>...<br>%RCX<def> = COPY %vreg1<kill>; GR64:%vreg1<br>
...<br>REP_MOVSD_64 %RCX<imp-def,dead>, %RDI<imp-def,dead>, %RSI<imp-def,dead>, %RCX<imp-use,kill>, %RDI<imp-use,kill,undef>, %RSI<imp-use,kill></font><br><br><br>Cheers,<br>Lang.