[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:39 PST 2024
================
@@ -1689,15 +1692,15 @@ static void computeKnownBitsFromOperator(const Operator *I,
default: break;
case Intrinsic::uadd_with_overflow:
case Intrinsic::sadd_with_overflow:
- computeKnownBitsAddSub(true, II->getArgOperand(0),
- II->getArgOperand(1), false, DemandedElts,
- Known, Known2, Depth, Q);
+ computeKnownBitsAddSub(
+ true, II->getArgOperand(0), II->getArgOperand(1), /*NSW*/ false,
+ /* NUW*/ false, DemandedElts, Known, Known2, Depth, Q);
break;
case Intrinsic::usub_with_overflow:
case Intrinsic::ssub_with_overflow:
- computeKnownBitsAddSub(false, II->getArgOperand(0),
- II->getArgOperand(1), false, DemandedElts,
- Known, Known2, Depth, Q);
+ computeKnownBitsAddSub(
+ false, II->getArgOperand(0), II->getArgOperand(1), /*NSW*/ false,
+ /* NUW*/ false, DemandedElts, Known, Known2, Depth, Q);
----------------
arsenm wrote:
```suggestion
false, II->getArgOperand(0), II->getArgOperand(1), /*NSW=*/ false,
/* NUW=*/ false, DemandedElts, Known, Known2, Depth, Q);
```
https://github.com/llvm/llvm-project/pull/83382
More information about the llvm-commits
mailing list