<div dir="ltr">LGTM</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 9:26 AM, Jun Koi <span dir="ltr"><<a href="mailto:junkoi2004@gmail.com" target="_blank">junkoi2004@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The current assembly of LEA instruction looks very weird.<br>This patch simplifies it.<br><br>Thanks.<br><br><br>diff --git a/lib/Target/X86/X86InstrArithmetic.td b/lib/Target/X86/X86InstrArithmetic.td<br>index 78efc4d..1a874b0 100644<br>--- a/lib/Target/X86/X86InstrArithmetic.td<br>+++ b/lib/Target/X86/X86InstrArithmetic.td<br>@@ -18,23 +18,23 @@ let SchedRW = [WriteLEA] in {<br> let hasSideEffects = 0 in<br> def LEA16r : I<0x8D, MRMSrcMem,<br> (outs GR16:$dst), (ins anymem:$src),<br>- "lea{w}\t{$src|$dst}, {$dst|$src}", [], IIC_LEA_16>, OpSize16;<br>+ "lea{w}\t{$src, $dst|$dst, $src}", [], IIC_LEA_16>, OpSize16;<br> let isReMaterializable = 1 in<br> def LEA32r : I<0x8D, MRMSrcMem,<br> (outs GR32:$dst), (ins anymem:$src),<br>- "lea{l}\t{$src|$dst}, {$dst|$src}",<br>+ "lea{l}\t{$src, $dst|$dst, $src}",<br> [(set GR32:$dst, lea32addr:$src)], IIC_LEA>,<br> OpSize32, Requires<[Not64BitMode]>;<br> <br> def LEA64_32r : I<0x8D, MRMSrcMem,<br> (outs GR32:$dst), (ins lea64_32mem:$src),<br>- "lea{l}\t{$src|$dst}, {$dst|$src}",<br>+ "lea{l}\t{$src, $dst|$dst, $src}",<br> [(set GR32:$dst, lea64_32addr:$src)], IIC_LEA>,<br> OpSize32, Requires<[In64BitMode]>;<br> <br> let isReMaterializable = 1 in<br> def LEA64r : RI<0x8D, MRMSrcMem, (outs GR64:$dst), (ins lea64mem:$src),<br>- "lea{q}\t{$src|$dst}, {$dst|$src}",<br>+ "lea{q}\t{$src, $dst|$dst, $src}",<br> [(set GR64:$dst, lea64addr:$src)], IIC_LEA>;<br> } // SchedRW<br> <br><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>