[llvm] e23aee7 - [test] Update some legacy PM tests

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 11:32:42 PDT 2022


Author: Arthur Eubanks
Date: 2022-09-30T11:31:02-07:00
New Revision: e23aee71758d33aeafaeb28842dd11b49af0cd26

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

LOG: [test] Update some legacy PM tests

Added: 
    

Modified: 
    llvm/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll
    llvm/test/Feature/OperandBundles/function-attrs.ll
    llvm/test/Feature/load_extension.ll
    llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll
    llvm/test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
    llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
    llvm/test/Transforms/LoopDeletion/pr49967.ll
    llvm/test/Transforms/LoopVectorize/AArch64/Oz-and-forced-vectorize.ll
    llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll
    llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
    llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll

Removed: 
    llvm/test/Analysis/alias-analysis-uses.ll
    llvm/test/Transforms/InstSimplify/remove-dead-call.ll
    llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll


################################################################################
diff  --git a/llvm/test/Analysis/alias-analysis-uses.ll b/llvm/test/Analysis/alias-analysis-uses.ll
deleted file mode 100644
index 715d5c6c557c3..0000000000000
--- a/llvm/test/Analysis/alias-analysis-uses.ll
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: opt -debug-pass=Executions -globals-aa -function-attrs -disable-output < %s -enable-new-pm=0 2>&1 | FileCheck %s
-
-; CHECK: Executing Pass 'Globals Alias Analysis'
-; CHECK-NOT: Freeing Pass 'Globals Alias Analysis'
-; CHECK: Executing Pass 'Deduce function attributes'
-; CHECK: Freeing Pass 'Globals Alias Analysis'
-
-define void @test(i8* %p) {
-  ret void
-}

diff  --git a/llvm/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll b/llvm/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll
index 4ff30a8c811f8..a8935e3baf6bc 100644
--- a/llvm/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll
+++ b/llvm/test/CodeGen/AMDGPU/infer-addrpace-pipeline.ll
@@ -1,11 +1,5 @@
-; RUN: opt -mtriple=amdgcn--amdhsa -disable-output -disable-verify -debug-pass=Structure -O2 %s -enable-new-pm=0 2>&1 | FileCheck -check-prefix=LPM %s
 ; RUN: opt -mtriple=amdgcn--amdhsa -disable-output -disable-verify -debug-pass-manager -passes='default<O2>' %s 2>&1 | FileCheck -check-prefix=NPM %s
 
-; LPM: Function Integration/Inlining
-; LPM: FunctionPass Manager
-; LPM: Infer address spaces
-; LPM: SROA
-
 ; NPM: Running pass: InlinerPass
 ; NPM: Running pass: InferAddressSpacesPass
 ; NPM: Running pass: SROA

diff  --git a/llvm/test/Feature/OperandBundles/function-attrs.ll b/llvm/test/Feature/OperandBundles/function-attrs.ll
index b0c60e1ab89b9..cfb67421ebb09 100644
--- a/llvm/test/Feature/OperandBundles/function-attrs.ll
+++ b/llvm/test/Feature/OperandBundles/function-attrs.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -function-attrs < %s -enable-new-pm=0 | FileCheck %s
+; RUN: opt -S -passes=inferattrs,function-attrs < %s | FileCheck %s
 
 declare void @f_readonly() readonly
 declare void @f_readnone() readnone

diff  --git a/llvm/test/Feature/load_extension.ll b/llvm/test/Feature/load_extension.ll
index 7b140ddc4b045..87ab01e7294c3 100644
--- a/llvm/test/Feature/load_extension.ll
+++ b/llvm/test/Feature/load_extension.ll
@@ -1,5 +1,4 @@
 ; REQUIRES: x86-registered-target
-; RUN: opt %s %loadbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s
 ; RUN: opt %s %loadnewpmbye %loadbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
 ; RUN: opt %s %loadnewpmbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
 ; RUN: opt -module-summary %s -o %t.o

diff  --git a/llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll b/llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll
index ae5bf236e2b10..fbac98fa5966f 100644
--- a/llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll
+++ b/llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll
@@ -1,47 +1,51 @@
-; RUN: opt < %s -mergereturn -loop-extract -enable-new-pm=0 -S | FileCheck %s
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
+; RUN: opt < %s -passes=loop-extract -S | FileCheck %s
 
 ; This test used to enter an infinite loop, until out of memory (PR3082).
 
 define void @test() {
-; CHECK-LABEL: define void @test()
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    br label %codeRepl
-; CHECK:       codeRepl:
-; CHECK-NEXT:    %targetBlock = call i1 @test.loopentry()
-; CHECK-NEXT:    br i1 %targetBlock, label %exit.1, label %exit.0
-; CHECK:       exit.0:
-; CHECK-NEXT:    br label %UnifiedReturnBlock
-; CHECK:       exit.1:
-; CHECK-NEXT:    br label %UnifiedReturnBlock
-; CHECK:       UnifiedReturnBlock:
-; CHECK-NEXT:    ret void
 
 entry:
   br label %loopentry
 
-loopentry:                                        ; preds = %loopexit, %entry
+loopentry:
   br i1 undef, label %exit.1, label %loopexit
 
-loopexit:                                         ; preds = %loopentry
+loopexit:
   br i1 undef, label %loopentry, label %exit.0
 
-exit.0:                                           ; preds = %loopexit
-  ret void
+exit.0:
+  br label %unified
+
+exit.1:
+  br label %unified
 
-exit.1:                                           ; preds = %loopentry
+unified:
   ret void
 }
-
-; CHECK-LABEL: define internal i1 @test.loopentry()
+; CHECK-LABEL: define {{[^@]+}}@test() {
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    br label [[CODEREPL:%.*]]
+; CHECK:       codeRepl:
+; CHECK-NEXT:    [[TARGETBLOCK:%.*]] = call i1 @test.loopentry()
+; CHECK-NEXT:    br i1 [[TARGETBLOCK]], label [[EXIT_1:%.*]], label [[EXIT_0:%.*]]
+; CHECK:       exit.0:
+; CHECK-NEXT:    br label [[UNIFIED:%.*]]
+; CHECK:       exit.1:
+; CHECK-NEXT:    br label [[UNIFIED]]
+; CHECK:       unified:
+; CHECK-NEXT:    ret void
+;
+;
+; CHECK-LABEL: define {{[^@]+}}@test.loopentry() {
 ; CHECK-NEXT:  newFuncRoot:
-; CHECK-NEXT:    br label %loopentry
+; CHECK-NEXT:    br label [[LOOPENTRY:%.*]]
 ; CHECK:       loopentry:
-; CHECK-NEXT:    br i1 true, label %exit.1.exitStub, label %loopexit
+; CHECK-NEXT:    br i1 undef, label [[EXIT_1_EXITSTUB:%.*]], label [[LOOPEXIT:%.*]]
 ; CHECK:       loopexit:
-; CHECK-NEXT:    br i1 false, label %loopexit.loopentry_crit_edge, label %exit.0.exitStub
-; CHECK:       loopexit.loopentry_crit_edge:
-; CHECK-NEXT:    br label %loopentry
+; CHECK-NEXT:    br i1 undef, label [[LOOPENTRY]], label [[EXIT_0_EXITSTUB:%.*]]
 ; CHECK:       exit.1.exitStub:
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       exit.0.exitStub:
 ; CHECK-NEXT:    ret i1 false
+;

diff  --git a/llvm/test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll b/llvm/test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
index f573668571d41..e7a3889d42c6c 100644
--- a/llvm/test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
+++ b/llvm/test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
@@ -1,5 +1,4 @@
 ; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -S < %s | FileCheck %s
-; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -pgso -S < %s -enable-new-pm=0 | FileCheck %s -check-prefix=PGSO
 ; RUN: opt -mtriple=arm-arm-none-eabi -passes='require<profile-summary>,consthoist' -pgso -S < %s | FileCheck %s -check-prefix=PGSO
 ; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -pgso=false -S < %s | FileCheck %s -check-prefix=NPGSO
 

diff  --git a/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll b/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
index 76fe2050605f6..d02ffd19b8c12 100644
--- a/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
+++ b/llvm/test/Transforms/InstCombine/early_constfold_changes_IR.ll
@@ -1,10 +1,6 @@
 ; This run line verifies that we get the expected constant fold.
 ; RUN: opt < %s -instcombine -S | FileCheck %s
 
-; This run line verifies that InstructionCombiningPass::runOnFunction reports
-; this as a modification of the IR.
-; RUN: opt < %s -instcombine -disable-output -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=DETAILS
-
 define i32 @foo(i32 %arg) #0 {
 ; CHECK-LABEL: @foo(
 ; CHECK-NEXT:  entry:
@@ -17,4 +13,3 @@ entry:
   ret i32 %and
 }
 
-; DETAILS:  Made Modification 'Combine redundant instructions' on Function 'foo'

diff  --git a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll b/llvm/test/Transforms/InstSimplify/remove-dead-call.ll
deleted file mode 100755
index 4f430958158d3..0000000000000
--- a/llvm/test/Transforms/InstSimplify/remove-dead-call.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instsimplify -S -o /dev/null -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck --check-prefix DETAILS %s
-; RUN: opt < %s -instsimplify -S -o - | FileCheck %s
-
-; Verify that InstSimplifyLegacyPass notifies the pass manager about changes
-; being made (when a call is removed CGSCC must be updated).
-;
-; DETAILS: Made Modification 'Remove redundant instructions' on Function 'main'
-
-define internal void @func_1(ptr nocapture readnone %0) #0 {
-; CHECK-LABEL: @func_1(
-; CHECK-NEXT:    ret void
-;
-  ret void
-}
-
-define i16 @main(i16 %0, ptr nocapture readnone %1) #1 {
-; CHECK-LABEL: @main(
-; CHECK-NEXT:  bb1:
-; CHECK-NEXT:    unreachable
-;
-bb1:
-  call void @func_1(ptr undef)
-  unreachable
-}
-
-attributes #0 = { noinline norecurse nounwind readnone willreturn }
-attributes #1 = { norecurse nounwind readnone }

diff  --git a/llvm/test/Transforms/LoopDeletion/pr49967.ll b/llvm/test/Transforms/LoopDeletion/pr49967.ll
index e7f510210966c..0fbf5dd477d74 100644
--- a/llvm/test/Transforms/LoopDeletion/pr49967.ll
+++ b/llvm/test/Transforms/LoopDeletion/pr49967.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -loop-deletion -enable-new-pm=0 < %s | FileCheck %s
+; RUN: opt -S -passes=loop-deletion < %s | FileCheck %s
 
 ; Make sure this does not crash due to incorrect SCEV invalidation (PR49967).
 

diff  --git a/llvm/test/Transforms/LoopVectorize/AArch64/Oz-and-forced-vectorize.ll b/llvm/test/Transforms/LoopVectorize/AArch64/Oz-and-forced-vectorize.ll
index 9dff3dffff2bb..a7bf05222bae1 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/Oz-and-forced-vectorize.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/Oz-and-forced-vectorize.ll
@@ -1,4 +1,3 @@
-; RUN: opt -Oz -S -enable-new-pm=0  < %s | FileCheck %s
 ; RUN: opt -passes='default<Oz>' -S < %s | FileCheck %s
 
 ; Forcing vectorization should allow for more aggressive loop-rotation with

diff  --git a/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll b/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll
index 09f3d16da5268..3e3efee594ec4 100644
--- a/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll
+++ b/llvm/test/Transforms/OpenMP/parallel_deletion_cg_update.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -attributor-cgscc -print-callgraph -disable-output -verify 2>&1 -enable-new-pm=0 | FileCheck %s
+; RUN: opt < %s -passes='function(instcombine),cgscc(attributor-cgscc),print-callgraph' -disable-output 2>&1 | FileCheck %s
 
 ; CHECK: Call graph node <<null function>><<{{.*}}>>  #uses=0
 ; CHECK:   CS<None> calls function 'dead_fork_call'

diff  --git a/llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll b/llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
index 8e02aa855957c..a33857391af10 100644
--- a/llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
+++ b/llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
@@ -1,5 +1,4 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -scoped-noalias-aa -slp-vectorizer -mtriple=arm64-apple-darwin -enable-new-pm=false -S %s | FileCheck %s
 ; RUN: opt -aa-pipeline='basic-aa,scoped-noalias-aa' -passes=slp-vectorizer -mtriple=arm64-apple-darwin -S %s | FileCheck %s
 
 define void @needs_versioning_not_profitable(i32* %dst, i32* %src) {

diff  --git a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
index 347a685929a5e..cfad18938461d 100644
--- a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
+++ b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
@@ -1,9 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s
-
-;; Check the report from the pass manager, telling us whether simplifycfg
-;; reported the "changed" status correctly:
-; CHECK: Made Modification 'Simplify the CFG' on Function 'wibble'...
+; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 2>&1 | FileCheck %s
 
 declare i32 @blam(i8*, i32)
 

diff  --git a/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll b/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
deleted file mode 100644
index 4330f337c1e0f..0000000000000
--- a/llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll
+++ /dev/null
@@ -1,44 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -loop-sink -break-crit-edges -branch-prob -S -enable-new-pm=0 | FileCheck %s
-; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S -enable-new-pm=0 | FileCheck %s
-; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S -enable-new-pm=0 | FileCheck %s
-
-; BreakCriticalEdges tries to update LI and DT if they are present. However,
-; updating LI actually needs a DT, so we now require DT in
-; BranchProbabilityInfo/LazyBlockFrequencyInfo/LazyBranchProbabilityInfo so it
-; is indeed available when LI is.
-
-target triple = "x86_64-unknown-linux-gnu"
-
-define void @f1() {
-; CHECK-LABEL: @f1(
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    br label [[FOR_COND:%.*]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    br i1 false, label [[FOR_BODY:%.*]], label [[FOR_COND_FOR_END_CRIT_EDGE:%.*]]
-; CHECK:       for.cond.for.end_crit_edge:
-; CHECK-NEXT:    br label [[FOR_END:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    br i1 true, label [[FOR_ENDSPLIT:%.*]], label [[FOR_INC:%.*]]
-; CHECK:       for.inc:
-; CHECK-NEXT:    br label [[FOR_COND]]
-; CHECK:       for.endsplit:
-; CHECK-NEXT:    br label [[FOR_END]]
-; CHECK:       for.end:
-; CHECK-NEXT:    ret void
-;
-entry:
-  br label %for.cond
-
-for.cond:                                         ; preds = %for.inc, %entry
-  br i1 undef, label %for.body, label %for.end
-
-for.body:                                         ; preds = %for.cond
-  br i1 undef, label %for.end, label %for.inc
-
-for.inc:                                          ; preds = %for.body
-  br label %for.cond
-
-for.end:                                          ; preds = %for.body, %for.cond
-  ret void
-}


        


More information about the llvm-commits mailing list