@@ -172,9 +172,9 @@ void Instruction::setIsExact(bool b) {
172172}
173173
174174void Instruction::setNonNeg (bool b) {
175- assert (isa<NonNegInstruction >(this ) && " Must be zext" );
176- SubclassOptionalData = (SubclassOptionalData & ~NonNegInstruction ::NonNeg) |
177- (b * NonNegInstruction ::NonNeg);
175+ assert (isa<PossiblyNonNegInst >(this ) && " Must be zext" );
176+ SubclassOptionalData = (SubclassOptionalData & ~PossiblyNonNegInst ::NonNeg) |
177+ (b * PossiblyNonNegInst ::NonNeg);
178178}
179179
180180bool Instruction::hasNoUnsignedWrap () const {
@@ -186,8 +186,8 @@ bool Instruction::hasNoSignedWrap() const {
186186}
187187
188188bool Instruction::hasNonNeg () const {
189- assert (isa<NonNegInstruction >(this ) && " Must be zext" );
190- return (SubclassOptionalData & NonNegInstruction ::NonNeg) != 0 ;
189+ assert (isa<PossiblyNonNegInst >(this ) && " Must be zext" );
190+ return (SubclassOptionalData & PossiblyNonNegInst ::NonNeg) != 0 ;
191191}
192192
193193bool Instruction::hasPoisonGeneratingFlags () const {
@@ -395,8 +395,8 @@ void Instruction::copyIRFlags(const Value *V, bool IncludeWrapFlags) {
395395 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this ))
396396 DestGEP->setIsInBounds (SrcGEP->isInBounds () || DestGEP->isInBounds ());
397397
398- if (auto *NNI = dyn_cast<NonNegInstruction >(V))
399- if (isa<NonNegInstruction >(this ))
398+ if (auto *NNI = dyn_cast<PossiblyNonNegInst >(V))
399+ if (isa<PossiblyNonNegInst >(this ))
400400 setNonNeg (NNI->hasNonNeg ());
401401}
402402
@@ -424,8 +424,8 @@ void Instruction::andIRFlags(const Value *V) {
424424 if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this ))
425425 DestGEP->setIsInBounds (SrcGEP->isInBounds () && DestGEP->isInBounds ());
426426
427- if (auto *NNI = dyn_cast<NonNegInstruction >(V))
428- if (isa<NonNegInstruction >(this ))
427+ if (auto *NNI = dyn_cast<PossiblyNonNegInst >(V))
428+ if (isa<PossiblyNonNegInst >(this ))
429429 setNonNeg (hasNonNeg () && NNI->hasNonNeg ());
430430}
431431
0 commit comments