[PATCH] D17032: [X86] Add a pass to change byte and word instructions to zero-extending versions.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 09:53:07 PST 2016
qcolombet accepted this revision.
qcolombet added a comment.
LGTM.
Thanks,
-Quentin
================
Comment at: lib/Target/X86/X86FixupBWInsts.cpp:198
@@ +197,3 @@
+
+ return true;
+}
----------------
kbsmith1 wrote:
> I think the loop in lines 217-219 already gets all the implicit ops. I looked at the code for copyImplicitOps, which looks like this:
> for (unsigned i = MI->getDesc().getNumOperands(), e = MI->getNumOperands();
> i != e; ++i) {
> const MachineOperand &MO = MI->getOperand(i);
> if ((MO.isReg() && MO.isImplicit()) || MO.isRegMask())
> addOperand(MF, MO);
> }
> Loop in 217-219 also ends at MI->getNumOoperands(), and is copying every single operand, so I think that loop is already getting all the implicit operands as well. Let me know if you don't think that is true.
Thanks for double checking.
I wasn’t sure getNumOperand also included the implicit operands and looking at the doxygen told me it was not… which is wrong :)
http://llvm.org/doxygen/classllvm_1_1MachineInstr.html#a7b5fe96d88954efc855e6c466207e535
http://reviews.llvm.org/D17032
More information about the llvm-commits
mailing list