summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/InstSelectSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-18 00:29:22 +0000
committerChris Lattner <sabre@nondot.org>2004-06-18 00:29:22 +0000
commitb30d12292a4c2fa79aa831ce678f5e3e48d95ee2 (patch)
tree31a29d4027327486b70eeeb92b3af256e5015aef /llvm/lib/Target/X86/InstSelectSimple.cpp
parentc37af629b4d3125eb83070b56e60a2218f393c77 (diff)
downloadbcm5719-llvm-b30d12292a4c2fa79aa831ce678f5e3e48d95ee2.tar.gz
bcm5719-llvm-b30d12292a4c2fa79aa831ce678f5e3e48d95ee2.zip
Fold setcc instructions into select and branches that are not in the same BB as
the setcc. llvm-svn: 14212
Diffstat (limited to 'llvm/lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r--llvm/lib/Target/X86/InstSelectSimple.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp
index 598a979471a..f49c6f5efa2 100644
--- a/llvm/lib/Target/X86/InstSelectSimple.cpp
+++ b/llvm/lib/Target/X86/InstSelectSimple.cpp
@@ -839,16 +839,14 @@ void ISel::getAddressingMode(Value *Addr, unsigned &BaseReg, unsigned &Scale,
// 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))
OpenPOWER on IntegriCloud