diff options
Diffstat (limited to 'llvm/test/Analysis/LoopAccessAnalysis')
| -rw-r--r-- | llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll b/llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll index 8ab8ab2a55b..ac8803ea9eb 100644 --- a/llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll +++ b/llvm/test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll @@ -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: |

