[llvm] r368450 - Title: Improve Loop Cache Analysis LIT tests.

Whitney Tsang via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 09:18:22 PDT 2019


Author: whitneyt
Date: Fri Aug  9 09:18:22 2019
New Revision: 368450

URL: http://llvm.org/viewvc/llvm-project?rev=368450&view=rev
Log:
Title: Improve Loop Cache Analysis LIT tests.
Summary: Make LIT tests unsensitive to analysis output order.
Authored By: etiotto

Modified:
    llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll
    llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll
    llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll
    llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll
    llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll

Modified: llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll?rev=368450&r1=368449&r2=368450&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll (original)
+++ llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll Fri Aug  9 09:18:22 2019
@@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-lin
 ;         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:

Modified: llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll?rev=368450&r1=368449&r2=368450&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll (original)
+++ llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll Fri Aug  9 09:18:22 2019
@@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-lin
 ;         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:

Modified: llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll?rev=368450&r1=368449&r2=368450&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll (original)
+++ llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll Fri Aug  9 09:18:22 2019
@@ -14,11 +14,11 @@ target triple = "powerpc64le-unknown-lin
 ;                 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 }>
 

Modified: llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll?rev=368450&r1=368449&r2=368450&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll (original)
+++ llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll Fri Aug  9 09:18:22 2019
@@ -10,9 +10,9 @@ target triple = "powerpc64le-unknown-lin
 ;         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:

Modified: llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll?rev=368450&r1=368449&r2=368450&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll (original)
+++ llvm/trunk/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll Fri Aug  9 09:18:22 2019
@@ -11,8 +11,8 @@ target triple = "powerpc64le-unknown-lin
 ;     }   
 ; }
 
-; 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:




More information about the llvm-commits mailing list