[PATCH] D11660: [x86] reassociate integer multiplies using machine combiner pass
Kevin B. Smith
kevin.b.smith at intel.com
Thu Jul 30 16:43:18 PDT 2015
kbsmith1 added a comment.
Slight correction to my comment on the code.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6312
@@ +6311,3 @@
+ if (Inst.getNumOperands() == 4)
+ if (!Inst.getOperand(3).isDead())
+ return false;
----------------
kbsmith1 wrote:
> Is there any possibility of 4 operand instructions where operand number 3 is dead, but is not EFLAGS? It seems like a check for (Inst.getOperand(3).isReg && Inst.getOperand(3).getReg() == X86::EFLAGS && !Inst.getOperand(3).isDead()) would be safer and more future proof.
My proposed code isn't really quite correct. I think the correct formulation would be:
if (!Inst.getOperand(3).isReg() || Inst.getOperand(3).getReg() != X86::EFLAGS || !Inst.getOperand(3).isDead()) return false.
http://reviews.llvm.org/D11660
More information about the llvm-commits
mailing list