Skip to content

Commit 6a6d6e5

Browse files
committed
[TargetLowering] Use dropFlags API. NFC.
1 parent 52981c1 commit 6a6d6e5

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
@@ -2606,13 +2606,9 @@ bool TargetLowering::SimplifyDemandedBits(
26062606
APInt TruncMask = DemandedBits.zext(OperandBitWidth);
26072607
if (SimplifyDemandedBits(Src, TruncMask, DemandedElts, Known, TLO,
26082608
Depth + 1)) {
2609-
if (Flags.hasNoSignedWrap() || Flags.hasNoUnsignedWrap()) {
2610-
// Disable the nsw and nuw flags. We can no longer guarantee that we
2611-
// won't wrap after simplification.
2612-
Flags.setNoSignedWrap(false);
2613-
Flags.setNoUnsignedWrap(false);
2614-
Op->setFlags(Flags);
2615-
}
2609+
// Disable the nsw and nuw flags. We can no longer guarantee that we
2610+
// won't wrap after simplification.
2611+
Op->dropFlags(SDNodeFlags::NoWrap);
26162612
return true;
26172613
}
26182614
Known = Known.trunc(BitWidth);

0 commit comments

Comments
 (0)