[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 8 15:24:44 PDT 2004



Changes in directory llvm/lib/Target/X86:

X86ISelSimple.cpp updated: 1.285 -> 1.286
---
Log message:

Fix a major regression from the bugfix for 2004-10-08-SelectSetCCFold.llx,
which prevented setcc's from being folded into branches.  It appears that
conditional branchinst's CC operand is actually operand(2), not operand(0)
as we might expect. :(



---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Target/X86/X86ISelSimple.cpp
diff -u llvm/lib/Target/X86/X86ISelSimple.cpp:1.285 llvm/lib/Target/X86/X86ISelSimple.cpp:1.286
--- llvm/lib/Target/X86/X86ISelSimple.cpp:1.285	Fri Oct  8 11:34:13 2004
+++ llvm/lib/Target/X86/X86ISelSimple.cpp	Fri Oct  8 17:24:31 2004
@@ -848,7 +848,7 @@
           (getClassB(SCI->getOperand(0)->getType()) != cLong ||
            SCI->getOpcode() == Instruction::SetEQ ||
            SCI->getOpcode() == Instruction::SetNE) &&
-          User->getOperand(0) == V)
+          (isa<BranchInst>(User) || User->getOperand(0) == V))
         return SCI;
     }
   return 0;






More information about the llvm-commits mailing list