summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-08 22:24:31 +0000
committerChris Lattner <sabre@nondot.org>2004-10-08 22:24:31 +0000
commit97ea4206f7b56b049cfdf98fc0d9fa63519d534f (patch)
tree2be933a46cbf78a4ca4ef4e06d2952ee6fccb5ed /llvm/lib/Target
parent1b8d2957d365ef29d18082b6a768bff117a38627 (diff)
downloadbcm5719-llvm-97ea4206f7b56b049cfdf98fc0d9fa63519d534f.tar.gz
bcm5719-llvm-97ea4206f7b56b049cfdf98fc0d9fa63519d534f.zip
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. :( llvm-svn: 16859
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelSimple.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelSimple.cpp b/llvm/lib/Target/X86/X86ISelSimple.cpp
index ff0ba759183..3b779363e0b 100644
--- a/llvm/lib/Target/X86/X86ISelSimple.cpp
+++ b/llvm/lib/Target/X86/X86ISelSimple.cpp
@@ -848,7 +848,7 @@ static SetCondInst *canFoldSetCCIntoBranchOrSelect(Value *V) {
(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;
OpenPOWER on IntegriCloud