[PATCH] D15549: [X86] Use push-pop for materializing small constants under 'minsize'
David Kreitzer via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 11:38:00 PST 2015
DavidKreitzer added inline comments.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:5310
@@ +5309,3 @@
+ switch (MIB->getOpcode()) {
+ case X86::MOV32ImmSExti8:
+ if (Subtarget.is64Bit()) {
----------------
This looks correct, but you could write it more simply by unifying 5311-5318 & 5327-5330. They are the same except for the lines that change the result register. You could use getX86SubSuperRegister(MIB->getOperand(0).getReg(), MVT::i64), which will work regardless of whether the original register is 32 or 64 bits.
http://reviews.llvm.org/D15549
More information about the llvm-commits
mailing list