[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:42 PST 2024


================
@@ -4581,7 +4581,7 @@ bool AMDGPUInstructionSelector::checkFlatScratchSVSSwizzleBug(
   // voffset to (soffset + inst_offset).
   auto VKnown = KB->getKnownBits(VAddr);
   auto SKnown = KnownBits::computeForAddSub(
-      true, false, KB->getKnownBits(SAddr),
+      /*Add*/ true, /*NSW*/ false, /*NUW*/ false, KB->getKnownBits(SAddr),
----------------
arsenm wrote:

```suggestion
      /*Add=*/ true, /*NSW=*/ false, /*NUW=*/ false, KB->getKnownBits(SAddr),
```

https://github.com/llvm/llvm-project/pull/83382


More information about the llvm-commits mailing list