Skip to content

Commit

Permalink
Title: Improve Loop Cache Analysis LIT tests.
Browse files Browse the repository at this point in the history
Summary: Make LIT tests unsensitive to analysis output order.
Authored By: etiotto

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368450 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
whitneywhtsang committed Aug 9, 2019
1 parent 25ebdf5 commit 561feff
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-linux-gnu"
; A[i][k][j] += B[i][k][j] + C[i][j][k];
; }

; CHECK: Loop 'for.i' has cost = 3000000
; CHECK-NEXT: Loop 'for.k' has cost = 2030000
; CHECK-NEXT: Loop 'for.j' has cost = 1060000
; CHECK-DAG: Loop 'for.i' has cost = 3000000
; CHECK-DAG: Loop 'for.k' has cost = 2030000
; CHECK-DAG: Loop 'for.j' has cost = 1060000

define void @foo(i64 %n, i64 %m, i64 %o, i32* %A, i32* %B, i32* %C) {
entry:
Expand Down
6 changes: 3 additions & 3 deletions test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-linux-gnu"
; C[i][j] = C[i][j] + A[i][k] * B[k][j];
; }

; CHECK:Loop 'for.i' has cost = 2010000
; CHECK-NEXT:Loop 'for.k' has cost = 1040000
; CHECK-NEXT:Loop 'for.j' has cost = 70000
; CHECK-DAG:Loop 'for.i' has cost = 2010000
; CHECK-DAG:Loop 'for.k' has cost = 1040000
; CHECK-DAG:Loop 'for.j' has cost = 70000

define void @matmul(i64 %n, i64 %m, i64 %o, i32* %A, i32* %B, i32* %C) {
entry:
Expand Down
10 changes: 5 additions & 5 deletions test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ target triple = "powerpc64le-unknown-linux-gnu"
; y[k+1][j][i][l] = y[k+1][j][i][l] + b[k][j][i][m][l]*x[k][j][i][m]
; }

; CHECK: Loop 'k_loop' has cost = 30000000000
; CHECK-NEXT: Loop 'j_loop' has cost = 30000000000
; CHECK-NEXT: Loop 'i_loop' has cost = 30000000000
; CHECK-NEXT: Loop 'm_loop' has cost = 10700000000
; CHECK-NEXT: Loop 'l_loop' has cost = 1300000000
; CHECK-DAG: Loop 'k_loop' has cost = 30000000000
; CHECK-DAG: Loop 'j_loop' has cost = 30000000000
; CHECK-DAG: Loop 'i_loop' has cost = 30000000000
; CHECK-DAG: Loop 'm_loop' has cost = 10700000000
; CHECK-DAG: Loop 'l_loop' has cost = 1300000000

%_elem_type_of_double = type <{ double }>

Expand Down
6 changes: 3 additions & 3 deletions test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-linux-gnu"
; A[2*i+3][3*j-4][2*k+7] = 1;
; }

; CHECK: Loop 'for.i' has cost = 1000000
; CHECK-NEXT: Loop 'for.j' has cost = 1000000
; CHECK-NEXT: Loop 'for.k' has cost = 60000
; CHECK-DAG: Loop 'for.i' has cost = 1000000
; CHECK-DAG: Loop 'for.j' has cost = 1000000
; CHECK-DAG: Loop 'for.k' has cost = 60000

define void @foo(i64 %n, i64 %m, i64 %o, i32* %A) {
entry:
Expand Down
4 changes: 2 additions & 2 deletions test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ target triple = "powerpc64le-unknown-linux-gnu"
; }
; }

; CHECK: Loop 'for.i' has cost = 20600
; CHECK-NEXT: Loop 'for.j' has cost = 800
; CHECK-DAG: Loop 'for.i' has cost = 20600
; CHECK-DAG: Loop 'for.j' has cost = 800

define void @foo(i64 %n, i64 %m, i32* %A, i32* %B, i32* %C) {
entry:
Expand Down

0 comments on commit 561feff

Please sign in to comment.