forked from OSchip/llvm-project
Remove dead store by taking a guess at what Chris meant. I wasn't able to
design a testcase that would tickle this behaviour. llvm-svn: 82357
This commit is contained in:
parent
f878d70720
commit
2949a2398c
|
@ -1241,12 +1241,11 @@ static ICmpInst::Predicate evaluateICmpRelation(LLVMContext &Context,
|
||||||
// null pointer, do the comparison with the pre-casted value.
|
// null pointer, do the comparison with the pre-casted value.
|
||||||
if (V2->isNullValue() &&
|
if (V2->isNullValue() &&
|
||||||
(isa<PointerType>(CE1->getType()) || CE1->getType()->isInteger())) {
|
(isa<PointerType>(CE1->getType()) || CE1->getType()->isInteger())) {
|
||||||
bool sgnd = isSigned;
|
|
||||||
if (CE1->getOpcode() == Instruction::ZExt) isSigned = false;
|
if (CE1->getOpcode() == Instruction::ZExt) isSigned = false;
|
||||||
if (CE1->getOpcode() == Instruction::SExt) isSigned = true;
|
if (CE1->getOpcode() == Instruction::SExt) isSigned = true;
|
||||||
return evaluateICmpRelation(Context, CE1Op0,
|
return evaluateICmpRelation(Context, CE1Op0,
|
||||||
Constant::getNullValue(CE1Op0->getType()),
|
Constant::getNullValue(CE1Op0->getType()),
|
||||||
sgnd);
|
isSigned);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue