We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bd3fa6 commit d09632bCopy full SHA for d09632b
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -2106,10 +2106,7 @@ Instruction *InstCombinerImpl::visitPtrToInt(PtrToIntInst &CI) {
2106
Base->getType() == Ty) {
2107
Value *Offset = EmitGEPOffset(GEP);
2108
auto *NewOp = BinaryOperator::CreateAdd(Base, Offset);
2109
- if (GEP->hasNoUnsignedWrap() ||
2110
- (GEP->hasNoUnsignedSignedWrap() &&
2111
- isKnownNonNegative(Offset, SQ.getWithInstruction(&CI))))
2112
- NewOp->setHasNoUnsignedWrap(true);
+ NewOp->setHasNoUnsignedWrap(GEP->hasNoUnsignedWrap());
2113
return NewOp;
2114
}
2115
0 commit comments