[llvm] [Knowbits] Make nuw and nsw support in computeForAddSub optimal (PR #83382)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 23:10:38 PST 2024
================
@@ -20156,7 +20156,8 @@ void ARMTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
// CSNEG: KnownOp0 or KnownOp1 * -1
if (Op.getOpcode() == ARMISD::CSINC)
KnownOp1 = KnownBits::computeForAddSub(
- true, false, KnownOp1, KnownBits::makeConstant(APInt(32, 1)));
+ /*Add*/ true, /*NSW*/ false, /*NUW*/ false, KnownOp1,
----------------
arsenm wrote:
```suggestion
/*Add=*/ true, /*NSW=*/ false, /*NUW=*/ false, KnownOp1,
```
https://github.com/llvm/llvm-project/pull/83382
More information about the llvm-commits
mailing list