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
This commit is contained in:
Chris Lattner 2004-10-08 16:34:13 +00:00
parent fc95027b7a
commit 0be2f50401
1 changed files with 2 additions and 1 deletions

View File

@ -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;