[llvm] LAA, LVer: add pre-commit tests for #96656 (PR #96925)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 02:17:32 PDT 2024


================
@@ -0,0 +1,49 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -passes='print<access-info>' -disable-output %s 2>&1 | FileCheck %s
+
+define void @false.equal.predicate(ptr %arg, ptr %arg1, i1 %arg2) {
+; CHECK-LABEL: 'false.equal.predicate'
+; CHECK-NEXT:    loop.body:
+; 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-NEXT:      Equal predicate: %load == 1
+; CHECK-EMPTY:
+; CHECK-NEXT:      Expressions re-written:
+; CHECK-NEXT:      [PSE] %gep10 = getelementptr double, ptr %gep8, i64 %mul:
+; CHECK-NEXT:        {(8 + %arg1),+,(8 * (sext i32 %load to i64))<nsw>}<%loop.body>
+; CHECK-NEXT:        --> {(8 + %arg1),+,8}<%loop.body>
+;
+entry:
+  %load = load i32, ptr %arg, align 4
----------------
artagnon wrote:

Okay, so it requires non-trivial changes for the `loop.exit` bb, and the predicate would change to `%arg == 1`, which I think is an entirely different test from speculating on the load.

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


More information about the llvm-commits mailing list