]> granicus.if.org Git - llvm/commitdiff
[LAA] Port test to the new PM
authorAdam Nemet <anemet@apple.com>
Fri, 8 Jul 2016 21:24:06 +0000 (21:24 +0000)
committerAdam Nemet <anemet@apple.com>
Fri, 8 Jul 2016 21:24:06 +0000 (21:24 +0000)
This is a follow-on to r274452.

The LAA with the new PM is a loop pass so we go from inner to outer loops.

Also using a CHECK-NOT didn't make much sense because we print something
in either case; whether an invariant is 'found' or 'not found'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274935 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll

index 8ab8ab2a55b6b9cdbc7c4cef92239ee038cdde19..ac8803ea9ebcaaa4a6bee17512d70d4b760f9696 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: opt < %s -loop-accesses -analyze | FileCheck %s
+; RUN: opt < %s -loop-accesses -analyze | FileCheck -check-prefix=OLDPM %s
+; RUN: opt -passes='require<scalar-evolution>,require<aa>,loop(print-access-info)' -disable-output  < %s 2>&1 | FileCheck -check-prefix=NEWPM %s
 
 ; Test to confirm LAA will find store to invariant address.
 ; Inner loop has a store to invariant address.
@@ -9,8 +10,17 @@
 ;    }
 ;  }
 
-; CHECK: Store to invariant address was found in loop.
-; CHECK-NOT: Store to invariant address was not found in loop.
+; The LAA with the new PM is a loop pass so we go from inner to outer loops.
+
+; OLDPM: for.cond1.preheader:
+; OLDPM:   Store to invariant address was not found in loop.
+; OLDPM: for.body3:
+; OLDPM:   Store to invariant address was found in loop.
+
+; NEWPM: for.body3:
+; NEWPM:   Store to invariant address was found in loop.
+; NEWPM: for.cond1.preheader:
+; NEWPM:   Store to invariant address was not found in loop.
 
 define i32 @foo(i32* nocapture %var1, i32* nocapture readonly %var2, i32 %itr) #0 {
 entry: