diff --git a/llvm/test/Other/cspgo-O2-pipeline.ll b/llvm/test/Other/cspgo-O2-pipeline.ll --- a/llvm/test/Other/cspgo-O2-pipeline.ll +++ b/llvm/test/Other/cspgo-O2-pipeline.ll @@ -1,13 +1,13 @@ ; Test CSGen pass in CSPGO. ; RUN: llvm-profdata merge %S/Inputs/cspgo-noncs.proftext -o %t-noncs.profdata ; RUN: llvm-profdata merge %S/Inputs/cspgo-cs.proftext -o %t-cs.profdata -; RUN: opt -O2 -debug-pass=Structure -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENDEFAULT +; RUN: opt -enable-new-pm=0 -O2 -debug-pass=Structure -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENDEFAULT ; CSGENDEFAULT: PGOInstrumentationUse ; CSGENDEFAULT: PGOInstrumentationGenCreateVar ; CSGENDEFAULT: PGOInstrumentationGen ; Test CSUse pass in CSPGO. -; RUN: opt -O2 -debug-pass=Structure -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSEDEFAULT +; RUN: opt -enable-new-pm=0 -O2 -debug-pass=Structure -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSEDEFAULT ; CSUSEDEFAULT: PGOInstrumentationUse ; CSUSEDEFAULT-NOT: PGOInstrumentationGenCreateVar ; CSUSEDEFAULT: PGOInstrumentationUse diff --git a/llvm/test/Other/loop-pass-printer.ll b/llvm/test/Other/loop-pass-printer.ll --- a/llvm/test/Other/loop-pass-printer.ll +++ b/llvm/test/Other/loop-pass-printer.ll @@ -1,19 +1,19 @@ ; This test checks -print-after/before on loop passes ; Besides of the loop itself it should be dumping loop pre-header and exits. ; -; RUN: opt < %s 2>&1 -disable-output \ +; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \ ; RUN: -loop-deletion -print-before=loop-deletion \ ; RUN: | FileCheck %s -check-prefix=DEL ; RUN: opt < %s 2>&1 -disable-output \ ; RUN: -passes='loop(loop-deletion)' -print-before-all \ ; RUN: | FileCheck %s -check-prefix=DEL -; RUN: opt < %s 2>&1 -disable-output \ +; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \ ; RUN: -loop-unroll -print-after=loop-unroll -filter-print-funcs=bar \ ; RUN: | FileCheck %s -check-prefix=BAR -check-prefix=BAR-OLD ; RUN: opt < %s 2>&1 -disable-output \ ; RUN: -passes='require,loop(loop-unroll-full)' -print-after-all -filter-print-funcs=bar \ ; RUN: | FileCheck %s -check-prefix=BAR -; RUN: opt < %s 2>&1 -disable-output \ +; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \ ; RUN: -loop-unroll -print-after=loop-unroll -filter-print-funcs=foo -print-module-scope \ ; RUN: | FileCheck %s -check-prefix=FOO-MODULE -check-prefix=FOO-MODULE-OLD ; RUN: opt < %s 2>&1 -disable-output \ diff --git a/llvm/test/Other/opt-O0-pipeline-enable-matrix.ll b/llvm/test/Other/opt-O0-pipeline-enable-matrix.ll --- a/llvm/test/Other/opt-O0-pipeline-enable-matrix.ll +++ b/llvm/test/Other/opt-O0-pipeline-enable-matrix.ll @@ -1,4 +1,4 @@ -; RUN: opt -O0 -enable-matrix -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s +; RUN: opt -enable-new-pm=0 -O0 -enable-matrix -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-O0-pipeline.ll b/llvm/test/Other/opt-O0-pipeline.ll --- a/llvm/test/Other/opt-O0-pipeline.ll +++ b/llvm/test/Other/opt-O0-pipeline.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=x86_64-- -O0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=CHECK,%llvmcheckext +; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -O0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=CHECK,%llvmcheckext ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-O2-pipeline.ll b/llvm/test/Other/opt-O2-pipeline.ll --- a/llvm/test/Other/opt-O2-pipeline.ll +++ b/llvm/test/Other/opt-O2-pipeline.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=x86_64-- -O2 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s +; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -O2 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll b/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll --- a/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll +++ b/llvm/test/Other/opt-O3-pipeline-enable-matrix.ll @@ -1,4 +1,4 @@ -; RUN: opt -O3 -enable-matrix -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s +; RUN: opt -enable-new-pm=0 -O3 -enable-matrix -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-O3-pipeline.ll b/llvm/test/Other/opt-O3-pipeline.ll --- a/llvm/test/Other/opt-O3-pipeline.ll +++ b/llvm/test/Other/opt-O3-pipeline.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=x86_64-- -O3 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s +; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -O3 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-Os-pipeline.ll b/llvm/test/Other/opt-Os-pipeline.ll --- a/llvm/test/Other/opt-Os-pipeline.ll +++ b/llvm/test/Other/opt-Os-pipeline.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=x86_64-- -Os -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s +; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -Os -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s ; REQUIRES: asserts diff --git a/llvm/test/Other/opt-pipeline-vector-passes.ll b/llvm/test/Other/opt-pipeline-vector-passes.ll --- a/llvm/test/Other/opt-pipeline-vector-passes.ll +++ b/llvm/test/Other/opt-pipeline-vector-passes.ll @@ -1,8 +1,8 @@ -; RUN: opt -O1 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O1 -; RUN: opt -O2 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2 -; RUN: opt -O2 -extra-vectorizer-passes -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2_EXTRA -; RUN: opt -O1 -vectorize-loops=0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O1_FORCE_OFF -; RUN: opt -O2 -vectorize-loops=0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2_FORCE_OFF +; RUN: opt -enable-new-pm=0 -O1 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O1 +; RUN: opt -enable-new-pm=0 -O2 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2 +; RUN: opt -enable-new-pm=0 -O2 -extra-vectorizer-passes -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2_EXTRA +; RUN: opt -enable-new-pm=0 -O1 -vectorize-loops=0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O1_FORCE_OFF +; RUN: opt -enable-new-pm=0 -O2 -vectorize-loops=0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s --check-prefixes=OLDPM_O2_FORCE_OFF ; RUN: opt -disable-verify -debug-pass-manager -passes='default' -S %s 2>&1 | FileCheck %s --check-prefixes=NEWPM_O1 ; RUN: opt -disable-verify -debug-pass-manager -passes='default' -S %s 2>&1 | FileCheck %s --check-prefixes=NEWPM_O2 diff --git a/llvm/test/Other/optimize-options.ll b/llvm/test/Other/optimize-options.ll --- a/llvm/test/Other/optimize-options.ll +++ b/llvm/test/Other/optimize-options.ll @@ -1,8 +1,8 @@ -;RUN: opt -S -O1 -debug-pass=Arguments %s 2>&1 | FileCheck %s -;RUN: opt -S -O2 -debug-pass=Arguments %s 2>&1 | FileCheck %s -;RUN: opt -S -Os -debug-pass=Arguments %s 2>&1 | FileCheck %s -;RUN: opt -S -Oz -debug-pass=Arguments %s 2>&1 | FileCheck %s -;RUN: opt -S -O3 -debug-pass=Arguments %s 2>&1 | FileCheck %s +;RUN: opt -enable-new-pm=0 -S -O1 -debug-pass=Arguments %s 2>&1 | FileCheck %s +;RUN: opt -enable-new-pm=0 -S -O2 -debug-pass=Arguments %s 2>&1 | FileCheck %s +;RUN: opt -enable-new-pm=0 -S -Os -debug-pass=Arguments %s 2>&1 | FileCheck %s +;RUN: opt -enable-new-pm=0 -S -Oz -debug-pass=Arguments %s 2>&1 | FileCheck %s +;RUN: opt -enable-new-pm=0 -S -O3 -debug-pass=Arguments %s 2>&1 | FileCheck %s ; Just check that we get a non-empty set of passes for each -O option. ;CHECK: Pass Arguments: {{.*}} -print-module diff --git a/llvm/test/Other/pass-pipelines.ll b/llvm/test/Other/pass-pipelines.ll --- a/llvm/test/Other/pass-pipelines.ll +++ b/llvm/test/Other/pass-pipelines.ll @@ -3,15 +3,15 @@ ; legacy pass manager doesn't introduce unexpected structural changes in the ; pass pipeline. ; -; RUN: opt -disable-output -disable-verify -debug-pass=Structure \ +; RUN: opt -enable-new-pm=0 -disable-output -disable-verify -debug-pass=Structure \ ; RUN: -O2 %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O2 ; RUN: llvm-profdata merge %S/Inputs/pass-pipelines.proftext -o %t.profdata -; RUN: opt -disable-output -disable-verify -debug-pass=Structure \ +; RUN: opt -enable-new-pm=0 -disable-output -disable-verify -debug-pass=Structure \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -O2 %s 2>&1 \ ; RUN: | FileCheck %s --check-prefix=CHECK-O2 --check-prefix=PGOUSE -; RUN: opt -disable-output -disable-verify -debug-pass=Structure \ +; RUN: opt -enable-new-pm=0 -disable-output -disable-verify -debug-pass=Structure \ ; RUN: -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' \ ; RUN: -hot-cold-split \ ; RUN: -O2 %s 2>&1 \ diff --git a/llvm/test/Other/print-cfg-sccs.ll b/llvm/test/Other/print-cfg-sccs.ll --- a/llvm/test/Other/print-cfg-sccs.ll +++ b/llvm/test/Other/print-cfg-sccs.ll @@ -1,4 +1,4 @@ -; RUN: opt -print-cfg-sccs -disable-output < %s 2>&1 | FileCheck %s +; RUN: opt -enable-new-pm=0 -print-cfg-sccs -disable-output < %s 2>&1 | FileCheck %s ; CHECK: SCCs for Function test in PostOrder: ; CHECK-NEXT: SCC #1 : %exit, diff --git a/llvm/test/Other/print-module-scope.ll b/llvm/test/Other/print-module-scope.ll --- a/llvm/test/Other/print-module-scope.ll +++ b/llvm/test/Other/print-module-scope.ll @@ -3,13 +3,13 @@ ; - all the function attributes are shown, including those of declarations ; - works on top of -print-after and -filter-print-funcs ; -; RUN: opt < %s 2>&1 -disable-output \ +; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \ ; RUN: -simplifycfg -print-after=simplifycfg -print-module-scope \ ; RUN: | FileCheck %s -check-prefix=CFG ; RUN: opt < %s 2>&1 -disable-output \ ; RUN: -passes=simplify-cfg -print-after-all -print-module-scope \ ; RUN: | FileCheck %s -check-prefix=CFG -; RUN: opt < %s 2>&1 -disable-output \ +; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \ ; RUN: -simplifycfg -print-after=simplifycfg -filter-print-funcs=foo -print-module-scope \ ; RUN: | FileCheck %s -check-prefix=FOO ; RUN: opt < %s 2>&1 -disable-output \ diff --git a/llvm/test/Other/printer.ll b/llvm/test/Other/printer.ll --- a/llvm/test/Other/printer.ll +++ b/llvm/test/Other/printer.ll @@ -1,4 +1,4 @@ -; RUN: opt -mem2reg -instcombine -print-after-all -disable-output < %s 2>&1 | \ +; RUN: opt -enable-new-pm=0 -mem2reg -instcombine -print-after-all -disable-output < %s 2>&1 | \ ; RUN: FileCheck --check-prefixes=CHECK,OLDPM %s --implicit-check-not='IR Dump' ; RUN: opt -passes='mem2reg,instcombine' -print-after-all -disable-output < %s 2>&1 | \ ; RUN: FileCheck --check-prefixes=CHECK,NEWPM %s --implicit-check-not='IR Dump' diff --git a/llvm/test/Other/time-passes.ll b/llvm/test/Other/time-passes.ll --- a/llvm/test/Other/time-passes.ll +++ b/llvm/test/Other/time-passes.ll @@ -1,11 +1,11 @@ -; RUN: opt < %s -disable-output -instcombine -instcombine -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY -; RUN: opt < %s -disable-output -instcombine -instcombine -licm -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY --check-prefix=TIME-DOUBLE-LICM-LEGACY +; RUN: opt -enable-new-pm=0 < %s -disable-output -instcombine -instcombine -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY +; RUN: opt -enable-new-pm=0 < %s -disable-output -instcombine -instcombine -licm -licm -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-LEGACY --check-prefix=TIME-DOUBLE-LICM-LEGACY ; RUN: opt < %s -disable-output -passes='instcombine,instcombine,loop(licm)' -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-NEW ; RUN: opt < %s -disable-output -passes='instcombine,loop(licm),instcombine,loop(licm)' -time-passes 2>&1 | FileCheck %s --check-prefix=TIME --check-prefix=TIME-NEW -check-prefix=TIME-DOUBLE-LICM-NEW ; RUN: opt < %s -disable-output -passes='default' -time-passes 2>&1 | FileCheck %s --check-prefix=TIME ; ; The following 4 test runs verify -info-output-file interaction (default goes to stderr, '-' goes to stdout). -; RUN: opt < %s -disable-output -O2 -time-passes -info-output-file='-' 2>/dev/null | FileCheck %s --check-prefix=TIME +; RUN: opt -enable-new-pm=0 < %s -disable-output -O2 -time-passes -info-output-file='-' 2>/dev/null | FileCheck %s --check-prefix=TIME ; RUN: opt < %s -disable-output -passes='default' -time-passes -info-output-file='-' 2>/dev/null | FileCheck %s --check-prefix=TIME ; ; RUN: rm -f %t; opt < %s -disable-output -O2 -time-passes -info-output-file=%t