[llvm] [LV] Preserve GEP nusw when widening memory (PR #160885)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 08:59:00 PDT 2025


================
@@ -7482,12 +7482,11 @@ VPRecipeBuilder::tryToWidenMemory(Instruction *I, ArrayRef<VPValue *> Operands,
     VPSingleDefRecipe *VectorPtr;
     if (Reverse) {
       // When folding the tail, we may compute an address that we don't in the
-      // original scalar loop and it may not be inbounds. Drop Inbounds in that
-      // case.
+      // original scalar loop: use none in this case.
----------------
lukel97 wrote:

Nit, mention what's being dropped?
```suggestion
      // original scalar loop: drop nusw/inbounds in this case.
```

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


More information about the llvm-commits mailing list