Fix test/Transforms/InstCombine/2007-01-27-AndICmp.ll, a miscompilation of

Mozilla that Anton tracked down.

llvm-svn: 33591
This commit is contained in:
Chris Lattner 2007-01-27 23:08:34 +00:00
parent d50698107e
commit c8fb6de78c
1 changed files with 2 additions and 1 deletions

View File

@ -3288,7 +3288,8 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
Instruction *Add = BinaryOperator::createAdd(LHSVal, AddCST,
LHSVal->getName()+".off");
InsertNewInstBefore(Add, I);
return new ICmpInst(ICmpInst::ICMP_UGT, Add, AddCST);
return new ICmpInst(ICmpInst::ICMP_UGT, Add,
ConstantInt::get(Add->getType(), 1));
}
break; // (X != 13 & X != 15) -> no change
}