[llvm] fed4e7d - [test][MemDep] Correct the 'NOT' checks in the invalidation.ll test case. NFC

Bjorn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 01:33:52 PDT 2023


Author: Bjorn Pettersson
Date: 2023-03-17T09:33:16+01:00
New Revision: fed4e7d0d2a45b1e49998054379af94d1ba43edd

URL: https://github.com/llvm/llvm-project/commit/fed4e7d0d2a45b1e49998054379af94d1ba43edd
DIFF: https://github.com/llvm/llvm-project/commit/fed4e7d0d2a45b1e49998054379af94d1ba43edd.diff

LOG: [test][MemDep] Correct the 'NOT' checks in the invalidation.ll test case. NFC

The MemoryDependenceAnalysis/invalidation.ll test case was using
  ; CHECK-NOT-AA-INVALIDATE:
but I think the intention was to use
  ; CHECK-AA-INVALIDATE-NOT:

Simply changing the checks like that would make the test fail.

The old statement that AA being stateless would result in nothing
to invalidate when doing invalidate<aa> is not true afaict.
It would be different if for example doing invalidate<basic-aa>, then
the AAManager isn't invalidated (and then neither memdep would be
invalidated). But when the AAManager itself is invalidated then we
should expect to find both "Invalidating analysis: AAManager" and
"Invalidating analysis: MemoryDependenceAnalysis" in the output.

Differential Revision: https://reviews.llvm.org/D146205

Added: 
    

Modified: 
    llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll b/llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll
index 894e60d319f71..cf933cc109f55 100644
--- a/llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll
+++ b/llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll
@@ -1,16 +1,19 @@
 ; Test that memdep gets invalidated when the analyses it depends on are
 ; invalidated.
 ;
-; Check AA. AA is stateless, there's nothing to invalidate.
+; Check AA. AA is stateless, but given an explicit invalidate (abandon) the
+; AAManager is invalidated and we must invalidate memdep as well given
+; the transitive dependency.
 ; RUN: opt -disable-output -debug-pass-manager -aa-pipeline='basic-aa' %s 2>&1 \
 ; RUN:     -passes='require<memdep>,invalidate<aa>,gvn' \
 ; RUN:     | FileCheck %s --check-prefix=CHECK-AA-INVALIDATE
 ; CHECK-AA-INVALIDATE: Running pass: RequireAnalysisPass
 ; CHECK-AA-INVALIDATE: Running analysis: MemoryDependenceAnalysis
 ; CHECK-AA-INVALIDATE: Running pass: InvalidateAnalysisPass
-; CHECK-NOT-AA-INVALIDATE: Invalidating analysis: MemoryDependenceAnalysis
-; CHECK-AA-INVALIDATE: Running pass: GVN
-; CHECK-NOT-AA-INVALIDATE: Running analysis: MemoryDependenceAnalysis
+; CHECK-AA-INVALIDATE: Invalidating analysis: AAManager
+; CHECK-AA-INVALIDATE: Invalidating analysis: MemoryDependenceAnalysis
+; CHECK-AA-INVALIDATE: Running pass: GVNPass
+; CHECK-AA-INVALIDATE: Running analysis: MemoryDependenceAnalysis
 ;
 ; Check domtree specifically.
 ; RUN: opt -disable-output -debug-pass-manager %s 2>&1 \
@@ -21,7 +24,7 @@
 ; CHECK-DT-INVALIDATE: Running pass: InvalidateAnalysisPass
 ; CHECK-DT-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis
 ; CHECK-DT-INVALIDATE: Invalidating analysis: MemoryDependenceAnalysis
-; CHECK-DT-INVALIDATE: Running pass: GVN
+; CHECK-DT-INVALIDATE: Running pass: GVNPass
 ; CHECK-DT-INVALIDATE: Running analysis: MemoryDependenceAnalysis
 ;
 


        


More information about the llvm-commits mailing list