Skip to content

Commit

Permalink
[LAA] Auto-generate checks for forward-loop-carried.ll
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fhahn committed Nov 27, 2023
1 parent edf5cae commit 2fda8ca
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions llvm/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 4
; RUN: opt -passes='print<access-info>' -disable-output < %s 2>&1 | FileCheck %s

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

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

define void @f(ptr %A, ptr %B, ptr %C, i64 %N) {

; CHECK: Dependences:
; CHECK-NEXT: Forward:
; CHECK-NEXT: store i32 %a_p1, ptr %Aidx_ahead, align 4 ->
; CHECK-NEXT: %a = load i32, ptr %Aidx, align 4

define void @forward_loop_carried(ptr noalias %A, ptr noalias %B, ptr noalias %C, i64 %N) {
; CHECK-LABEL: 'forward_loop_carried'
; CHECK-NEXT: for.body:
; CHECK-NEXT: Memory dependences are safe
; CHECK-NEXT: Dependences:
; CHECK-NEXT: Forward:
; CHECK-NEXT: store i32 %a_p1, ptr %Aidx_ahead, align 4 ->
; CHECK-NEXT: %a = load i32, ptr %Aidx, align 4
; CHECK-EMPTY:
; 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 %for.body

Expand Down

0 comments on commit 2fda8ca

Please sign in to comment.