[PATCH] D21774: [X86] Transform setcc + movzbl into xorl + setcc
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 23:02:56 PDT 2016
delena added inline comments.
================
Comment at: lib/Target/X86/X86FixupSetCC.cpp:119
@@ +118,3 @@
+ MachineInstr *FlagsDefMI = findFlagsImpDef(
+ MI.getParent(), MachineBasicBlock::reverse_iterator(&MI));
+ if (!FlagsDefMI)
----------------
When you go backward, you should ensure that MI.getOperand(0).getReg() is not used between setcc and FlagsDefMI, including the second one.
for example:
test %eax, %eax
setcc %al
you can kill %eax before the "test".
http://reviews.llvm.org/D21774
More information about the llvm-commits
mailing list