don't bother handling non-canonical icmp's

llvm-svn: 121676
This commit is contained in:
Chris Lattner 2010-12-13 04:18:32 +00:00
parent 395252d93e
commit 9b1af510cb
1 changed files with 9 additions and 11 deletions

View File

@ -306,11 +306,10 @@ GatherConstantSetEQs(Value *V, std::vector<ConstantInt*> &Values,
Values.push_back(C);
return Inst->getOperand(0);
}
if (ConstantInt *C = GetConstantInt(Inst->getOperand(0), TD)) {
Values.push_back(C);
return Inst->getOperand(1);
return 0;
}
} else if (Inst->getOpcode() == Instruction::Or) {
if (Inst->getOpcode() == Instruction::Or) {
if (Value *LHS = GatherConstantSetEQs(Inst->getOperand(0), Values, TD))
if (Value *RHS = GatherConstantSetEQs(Inst->getOperand(1), Values, TD))
if (LHS == RHS)
@ -334,11 +333,10 @@ GatherConstantSetNEs(Value *V, std::vector<ConstantInt*> &Values,
Values.push_back(C);
return Inst->getOperand(0);
}
if (ConstantInt *C = GetConstantInt(Inst->getOperand(0), TD)) {
Values.push_back(C);
return Inst->getOperand(1);
return 0;
}
} else if (Inst->getOpcode() == Instruction::And) {
if (Inst->getOpcode() == Instruction::And) {
if (Value *LHS = GatherConstantSetNEs(Inst->getOperand(0), Values, TD))
if (Value *RHS = GatherConstantSetNEs(Inst->getOperand(1), Values, TD))
if (LHS == RHS)