summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-08 16:34:13 +0000
committerChris Lattner <sabre@nondot.org>2004-10-08 16:34:13 +0000
commit0be2f50401601c3cad5cf2be8d085a688fcf16ff (patch)
tree36fee4631d4c51da086acdb30ec20d2f60d44bd6 /llvm/lib
parentfc95027b7afb479cbb028a2dedbd3c9b38e1ef29 (diff)
downloadbcm5719-llvm-0be2f50401601c3cad5cf2be8d085a688fcf16ff.tar.gz
bcm5719-llvm-0be2f50401601c3cad5cf2be8d085a688fcf16ff.zip
Fix bug: 2004-10-08-SelectSetCCFold.llx. Normally this is hidden by the
instcombine xform, which is why we didn't notice it before. llvm-svn: 16840
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelSimple.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelSimple.cpp b/llvm/lib/Target/X86/X86ISelSimple.cpp
index 71607b4ad86..ff0ba759183 100644
--- a/llvm/lib/Target/X86/X86ISelSimple.cpp
+++ b/llvm/lib/Target/X86/X86ISelSimple.cpp
@@ -847,7 +847,8 @@ static SetCondInst *canFoldSetCCIntoBranchOrSelect(Value *V) {
if ((isa<BranchInst>(User) || isa<SelectInst>(User)) &&
(getClassB(SCI->getOperand(0)->getType()) != cLong ||
SCI->getOpcode() == Instruction::SetEQ ||
- SCI->getOpcode() == Instruction::SetNE))
+ SCI->getOpcode() == Instruction::SetNE) &&
+ User->getOperand(0) == V)
return SCI;
}
return 0;
OpenPOWER on IntegriCloud