[llvm] [LoopInterchange] Drop nuw/nsw flags from reduction ops when interchanging (PR #148612)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 04:49:05 PDT 2025
================
@@ -405,6 +409,11 @@ class LoopInterchangeLegality {
/// Set of inner loop induction PHIs
SmallVector<PHINode *, 8> InnerLoopInductions;
+
+ /// Hold instructions that have nuw/nsw flags and involved in reductions,
+ /// like integer addition/multiplication. Those flags must be dropped when
+ /// exchanging the loops.
----------------
nikic wrote:
```suggestion
/// interchanging the loops.
```
https://github.com/llvm/llvm-project/pull/148612
More information about the llvm-commits
mailing list