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

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 14:28:35 PST 2015


DavidKreitzer added inline comments.

================
Comment at: test/CodeGen/X86/materialize.ll:43
@@ +42,3 @@
+
+; On 64-bit we don't do xor-inc yet, so push-pop it is.
+; CHECK64-LABEL: one32_minsize:
----------------
The reason for deferring the use of xor-inc/dec on 64-bit was the possible REX prefixes, right? You'll have the same problem with the pop, though it will only cost one byte rather than two. Is that one-byte difference the reason you allow push/pop currently but avoid xor-inc/dec?

================
Comment at: test/CodeGen/X86/materialize.ll:45
@@ +44,3 @@
+; CHECK64-LABEL: one32_minsize:
+; CHECK64:       pushl $1
+; CHECK64:       .cfi_adjust_cfa_offset 4
----------------
Hmmm, pushl and popl are not valid instructions in 64-bit mode. They should instead be pushq and popq, and the CFA adjustments should be +/-8. It looks like this is just a problem in the test, as the code to generate them looks fine.




http://reviews.llvm.org/D15549





More information about the llvm-commits mailing list