diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-10-08 16:34:13 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-10-08 16:34:13 +0000 |
| commit | 0be2f50401601c3cad5cf2be8d085a688fcf16ff (patch) | |
| tree | 36fee4631d4c51da086acdb30ec20d2f60d44bd6 /llvm/lib | |
| parent | fc95027b7afb479cbb028a2dedbd3c9b38e1ef29 (diff) | |
| download | bcm5719-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.cpp | 3 |
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; |

