[PATCH] D15549: [X86] Use push-pop for materializing small constants under 'minsize'

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 09:32:28 PST 2015


hans added inline comments.

================
Comment at: test/CodeGen/X86/materialize.ll:46
@@ +45,3 @@
+; CHECK64:       movl $1, %eax
+; CHECK64-NEXT:  retq
+}
----------------
DavidKreitzer wrote:
> Ah, okay, thanks for the explanation.  So maybe the right thing to do is to allow MOV32ImmSExti8 to be selected on both 32-bit and 64-bit. Then in ExpandMOVImmSExti8, base the push/pop size not on the opcode but on the target. (Just maybe assert that MOV64ImmSExti8 doesn't occur on 32-bit.)
> 
That sounds good to me. The tricky part is that we'll have to widen the target register of the pop, but I think that's doable.


http://reviews.llvm.org/D15549





More information about the llvm-commits mailing list