Skip to content

Commit 2fda8ca

Browse files
committed
[LAA] Auto-generate checks for forward-loop-carried.ll
Auto-generate checks for -loop-carried.ll to make it easier to update in follow-on patch. As this test only checks the dependence, mark pointers as noalias to avoid also checking various runtime pointer check groups.
1 parent edf5cae commit 2fda8ca

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

llvm/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 4
12
; RUN: opt -passes='print<access-info>' -disable-output < %s 2>&1 | FileCheck %s
23

34
; for (unsigned i = 0; i < 100; i++) {
@@ -7,13 +8,23 @@
78

89
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
910

10-
define void @f(ptr %A, ptr %B, ptr %C, i64 %N) {
11-
12-
; CHECK: Dependences:
13-
; CHECK-NEXT: Forward:
14-
; CHECK-NEXT: store i32 %a_p1, ptr %Aidx_ahead, align 4 ->
15-
; CHECK-NEXT: %a = load i32, ptr %Aidx, align 4
16-
11+
define void @forward_loop_carried(ptr noalias %A, ptr noalias %B, ptr noalias %C, i64 %N) {
12+
; CHECK-LABEL: 'forward_loop_carried'
13+
; CHECK-NEXT: for.body:
14+
; CHECK-NEXT: Memory dependences are safe
15+
; CHECK-NEXT: Dependences:
16+
; CHECK-NEXT: Forward:
17+
; CHECK-NEXT: store i32 %a_p1, ptr %Aidx_ahead, align 4 ->
18+
; CHECK-NEXT: %a = load i32, ptr %Aidx, align 4
19+
; CHECK-EMPTY:
20+
; CHECK-NEXT: Run-time memory checks:
21+
; CHECK-NEXT: Grouped accesses:
22+
; CHECK-EMPTY:
23+
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
24+
; CHECK-NEXT: SCEV assumptions:
25+
; CHECK-EMPTY:
26+
; CHECK-NEXT: Expressions re-written:
27+
;
1728
entry:
1829
br label %for.body
1930

0 commit comments

Comments
 (0)