[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jun 17 19:36:02 PDT 2004
Changes in directory llvm/lib/Target/X86:
InstSelectSimple.cpp updated: 1.265 -> 1.266
---
Log message:
Fold setcc instructions into select and branches that are not in the same BB as
the setcc.
---
Diffs of the changes: (+2 -4)
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.265 llvm/lib/Target/X86/InstSelectSimple.cpp:1.266
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.265 Thu Jun 17 17:15:25 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Thu Jun 17 19:29:22 2004
@@ -839,16 +839,14 @@
// canFoldSetCCIntoBranchOrSelect - Return the setcc instruction if we can fold
// it into the conditional branch or select instruction which is the only user
// of the cc instruction. This is the case if the conditional branch is the
-// only user of the setcc, and if the setcc is in the same basic block as the
-// conditional branch. We also don't handle long arguments below, so we reject
-// them here as well.
+// only user of the setcc. We also don't handle long arguments below, so we
+// reject them here as well.
//
static SetCondInst *canFoldSetCCIntoBranchOrSelect(Value *V) {
if (SetCondInst *SCI = dyn_cast<SetCondInst>(V))
if (SCI->hasOneUse()) {
Instruction *User = cast<Instruction>(SCI->use_back());
if ((isa<BranchInst>(User) || isa<SelectInst>(User)) &&
- SCI->getParent() == User->getParent() &&
(getClassB(SCI->getOperand(0)->getType()) != cLong ||
SCI->getOpcode() == Instruction::SetEQ ||
SCI->getOpcode() == Instruction::SetNE))
More information about the llvm-commits
mailing list