[llvm] [LSR] Don't count conditional loads/store as enabling pre/post-index (PR #159573)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 10:16:06 PDT 2025


================
@@ -1318,6 +1318,11 @@ class LSRUse {
   /// the loop, in which case some special-case heuristics may be used.
   bool AllFixupsOutsideLoop = true;
 
+  /// This records whether all of the fixups using this LSRUse are unconditional
+  /// within the loop, meaning they will be executed in every iteration of the
+  /// loop.
----------------
nikic wrote:

I'd like some more precision here, something along these lines:
```suggestion
  /// within the loop, meaning they will be executed on every path to the loop latch.
  /// This includes fixups before early exits.
```

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


More information about the llvm-commits mailing list