Skip to content

Commit 9137580

Browse files
committed
[TargetLowering] Use dropFlags API. NFC.
1 parent 263b1d4 commit 9137580

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,13 +2560,9 @@ bool TargetLowering::SimplifyDemandedBits(
25602560
APInt TruncMask = DemandedBits.zext(OperandBitWidth);
25612561
if (SimplifyDemandedBits(Src, TruncMask, DemandedElts, Known, TLO,
25622562
Depth + 1)) {
2563-
if (Flags.hasNoSignedWrap() || Flags.hasNoUnsignedWrap()) {
2564-
// Disable the nsw and nuw flags. We can no longer guarantee that we
2565-
// won't wrap after simplification.
2566-
Flags.setNoSignedWrap(false);
2567-
Flags.setNoUnsignedWrap(false);
2568-
Op->setFlags(Flags);
2569-
}
2563+
// Disable the nsw and nuw flags. We can no longer guarantee that we
2564+
// won't wrap after simplification.
2565+
Op->dropFlags(SDNodeFlags::NoWrap);
25702566
return true;
25712567
}
25722568
Known = Known.trunc(BitWidth);

0 commit comments

Comments
 (0)