[llvm] LAA: add missed swap when inverting src, sink (PR #122254)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 03:13:58 PST 2025
================
@@ -194,3 +194,79 @@ loop:
exit:
ret void
}
+
+; In the following test, the source is loop-invariant.
+
+define void @type_size_equivalence_src_loopinv(ptr nocapture %vec, i64 %n) {
+; CHECK-LABEL: 'type_size_equivalence_src_loopinv'
+; CHECK-NEXT: loop:
+; CHECK-NEXT: Memory dependences are safe
+; CHECK-NEXT: Dependences:
+; CHECK-NEXT: Run-time memory checks:
+; CHECK-NEXT: Grouped accesses:
+; CHECK-EMPTY:
+; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
+; CHECK-NEXT: SCEV assumptions:
+; CHECK-EMPTY:
+; CHECK-NEXT: Expressions re-written:
+;
+entry:
+ br label %loop
+
+loop:
+ %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
+
+ %gep.iv = getelementptr i64, ptr %vec, i64 %iv
+ %ld.i64 = load i64, ptr %gep.iv, align 8
----------------
artagnon wrote:
Yes, thanks: fixed now :)
https://github.com/llvm/llvm-project/pull/122254
More information about the llvm-commits
mailing list