diff --git a/llvm/test/CodeGen/WinEH/wineh-intrinsics-invalid.ll b/llvm/test/CodeGen/WinEH/wineh-intrinsics-invalid.ll --- a/llvm/test/CodeGen/WinEH/wineh-intrinsics-invalid.ll +++ b/llvm/test/CodeGen/WinEH/wineh-intrinsics-invalid.ll @@ -1,5 +1,5 @@ -; RUN: sed -e s/.T1:// %s | not opt -lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK1 %s -; RUN: sed -e s/.T2:// %s | not opt -lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s +; RUN: sed -e s/.T1:// %s | not opt -passes=lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK1 %s +; RUN: sed -e s/.T2:// %s | not opt -passes=lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s target triple = "x86_64-pc-windows-msvc" diff --git a/llvm/test/Other/opt-On.ll b/llvm/test/Other/opt-On.ll --- a/llvm/test/Other/opt-On.ll +++ b/llvm/test/Other/opt-On.ll @@ -1,6 +1,6 @@ ; RUN: not opt -O1 -O2 < %s 2>&1 | FileCheck %s --check-prefix=MULTIPLE ; RUN: not opt -O1 -passes='no-op-module' < %s 2>&1 | FileCheck %s --check-prefix=BOTH -; RUN: not opt -O1 --gvn < %s 2>&1 | FileCheck %s --check-prefix=BOTH +; RUN: not opt -O1 -passes=gvn < %s 2>&1 | FileCheck %s --check-prefix=BOTH ; RUN: opt -O0 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT ; RUN: opt -O1 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT ; RUN: opt -O2 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT diff --git a/llvm/test/Other/opt-legacy-syntax-deprecation.ll b/llvm/test/Other/opt-legacy-syntax-deprecation.ll --- a/llvm/test/Other/opt-legacy-syntax-deprecation.ll +++ b/llvm/test/Other/opt-legacy-syntax-deprecation.ll @@ -1,12 +1,12 @@ ; REQUIRES: x86-registered-target -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output 2>&1 | FileCheck %s --check-prefix=OK --allow-empty -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -passes=instcombine 2>&1 | FileCheck %s --check-prefix=OK --allow-empty -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine 2>&1 | FileCheck %s --check-prefix=WARN -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine -globaldce 2>&1 | FileCheck %s --check-prefix=WARN -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -instcombine -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=OK --allow-empty -; RUN: opt -temporarily-allow-old-pass-syntax /dev/null -disable-output -codegenprepare -mtriple=x86_64-unknown-linux-gnu 2>&1 | FileCheck %s --check-prefix=OK --allow-empty +; RUN: opt /dev/null -disable-output 2>&1 | FileCheck %s --check-prefix=OK --allow-empty +; RUN: opt /dev/null -disable-output -passes=instcombine 2>&1 | FileCheck %s --check-prefix=OK --allow-empty +; RUN: not opt /dev/null -disable-output -instcombine 2>&1 | FileCheck %s --check-prefix=WARN +; RUN: not opt /dev/null -disable-output -instcombine -globaldce 2>&1 | FileCheck %s --check-prefix=WARN +; RUN: opt /dev/null -disable-output -instcombine -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=OK --allow-empty +; RUN: opt /dev/null -disable-output -codegenprepare -mtriple=x86_64-unknown-linux-gnu 2>&1 | FileCheck %s --check-prefix=OK --allow-empty ; OK-NOT: deprecated -; WARN: The `opt -passname` syntax for the new pass manager is deprecated, please use `opt -passes=` (or the `-p` alias for a more concise version). +; WARN: The `opt -passname` syntax for the new pass manager is not supported, please use `opt -passes=` (or the `-p` alias for a more concise version). diff --git a/llvm/test/Other/opt-old-new-pm-passes.ll b/llvm/test/Other/opt-old-new-pm-passes.ll deleted file mode 100644 --- a/llvm/test/Other/opt-old-new-pm-passes.ll +++ /dev/null @@ -1,2 +0,0 @@ -; RUN: not opt -dce --passes=inline %s 2>&1 | FileCheck %s -; CHECK: Cannot specify passes via both -foo-pass and --passes=foo-pass diff --git a/llvm/test/Other/scalable-vector-array.ll b/llvm/test/Other/scalable-vector-array.ll --- a/llvm/test/Other/scalable-vector-array.ll +++ b/llvm/test/Other/scalable-vector-array.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s ;; Arrays cannot contain scalable vectors; make sure we detect them even ;; when nested inside other aggregates. diff --git a/llvm/test/Transforms/HardwareLoops/ARM/structure.ll b/llvm/test/Transforms/HardwareLoops/ARM/structure.ll --- a/llvm/test/Transforms/HardwareLoops/ARM/structure.ll +++ b/llvm/test/Transforms/HardwareLoops/ARM/structure.ll @@ -1,8 +1,8 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=thumbv8.1m.main-none-none-eabi -hardware-loops %s -S -o - | \ +; RUN: opt -mtriple=thumbv8.1m.main-none-none-eabi -hardware-loops %s -S -o - | \ ; RUN: FileCheck %s -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=thumbv8.1m.main -loop-unroll -unroll-remainder=false -S < %s | \ +; RUN: opt -mtriple=thumbv8.1m.main -passes=loop-unroll -unroll-remainder=false -S < %s | \ ; RUN: llc -mtriple=thumbv8.1m.main | FileCheck %s --check-prefix=CHECK-UNROLL -; RUN: opt -temporarily-allow-old-pass-syntax -mtriple=thumbv8.1m.main-none-none-eabi -hardware-loops \ +; RUN: opt -mtriple=thumbv8.1m.main-none-none-eabi -hardware-loops \ ; RUN: -pass-remarks-analysis=hardware-loops %s -S -o - 2>&1 | \ ; RUN: FileCheck %s --check-prefix=CHECK-REMARKS diff --git a/llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll b/llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll --- a/llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll +++ b/llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll @@ -1,6 +1,6 @@ -; RUN: opt -temporarily-allow-old-pass-syntax -codegenprepare -load-store-vectorizer %s -S -o - | FileCheck %s -; RUN: opt -temporarily-allow-old-pass-syntax -load-store-vectorizer %s -S -o - | FileCheck %s -; RUN: opt -temporarily-allow-old-pass-syntax -aa-pipeline=basic-aa -passes='function(load-store-vectorizer)' %s -S -o - | FileCheck %s +; RUN: opt -codegenprepare -load-store-vectorizer %s -S -o - | FileCheck %s +; RUN: opt -passes=load-store-vectorizer %s -S -o - | FileCheck %s +; RUN: opt -aa-pipeline=basic-aa -passes='function(load-store-vectorizer)' %s -S -o - | FileCheck %s target triple = "x86_64--" diff --git a/llvm/test/Verifier/assume-bundles.ll b/llvm/test/Verifier/assume-bundles.ll --- a/llvm/test/Verifier/assume-bundles.ll +++ b/llvm/test/Verifier/assume-bundles.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s declare void @llvm.assume(i1) diff --git a/llvm/test/Verifier/atomics.ll b/llvm/test/Verifier/atomics.ll --- a/llvm/test/Verifier/atomics.ll +++ b/llvm/test/Verifier/atomics.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s ; CHECK: atomic store operand must have integer, pointer, or floating point type! ; CHECK: atomic load operand must have integer, pointer, or floating point type! diff --git a/llvm/test/Verifier/callbr.ll b/llvm/test/Verifier/callbr.ll --- a/llvm/test/Verifier/callbr.ll +++ b/llvm/test/Verifier/callbr.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S %s -verify 2>&1 | FileCheck %s +; RUN: not opt -S %s -passes=verify 2>&1 | FileCheck %s ; CHECK: Number of label constraints does not match number of callbr dests ; CHECK-NEXT: #too_few_label_constraints diff --git a/llvm/test/Verifier/deoptimize-intrinsic.ll b/llvm/test/Verifier/deoptimize-intrinsic.ll --- a/llvm/test/Verifier/deoptimize-intrinsic.ll +++ b/llvm/test/Verifier/deoptimize-intrinsic.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s declare i8 @llvm.experimental.deoptimize.i8(...) declare void @llvm.experimental.deoptimize.isVoid(...) diff --git a/llvm/test/Verifier/dllstorage.ll b/llvm/test/Verifier/dllstorage.ll --- a/llvm/test/Verifier/dllstorage.ll +++ b/llvm/test/Verifier/dllstorage.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify %s 2>&1 | FileCheck %s target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-gnu" diff --git a/llvm/test/Verifier/element-wise-atomic-memory-intrinsics.ll b/llvm/test/Verifier/element-wise-atomic-memory-intrinsics.ll --- a/llvm/test/Verifier/element-wise-atomic-memory-intrinsics.ll +++ b/llvm/test/Verifier/element-wise-atomic-memory-intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s define void @test_memcpy(i8* %P, i8* %Q, i32 %A, i32 %E) { ; CHECK: immarg operand has non-immediate parameter diff --git a/llvm/test/Verifier/guard-intrinsic.ll b/llvm/test/Verifier/guard-intrinsic.ll --- a/llvm/test/Verifier/guard-intrinsic.ll +++ b/llvm/test/Verifier/guard-intrinsic.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s declare void @llvm.experimental.guard(i1, ...) diff --git a/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll b/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll --- a/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll +++ b/llvm/test/Verifier/insert-extract-intrinsics-invalid.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify -S < %s 2>&1 >/dev/null | FileCheck %s +; RUN: not opt -passes=verify -S < %s 2>&1 >/dev/null | FileCheck %s ; ; Test that extractions/insertion indices are validated. diff --git a/llvm/test/Verifier/intrinsic-arg-overloading-struct-ret.ll b/llvm/test/Verifier/intrinsic-arg-overloading-struct-ret.ll --- a/llvm/test/Verifier/intrinsic-arg-overloading-struct-ret.ll +++ b/llvm/test/Verifier/intrinsic-arg-overloading-struct-ret.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify -S < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify -S < %s 2>&1 | FileCheck %s ; LD2 and LD2LANE diff --git a/llvm/test/Verifier/intrinsic-bad-arg-type.ll b/llvm/test/Verifier/intrinsic-bad-arg-type.ll --- a/llvm/test/Verifier/intrinsic-bad-arg-type.ll +++ b/llvm/test/Verifier/intrinsic-bad-arg-type.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify 2>&1 < %s | FileCheck %s +; RUN: not opt -S -passes=verify 2>&1 < %s | FileCheck %s ; CHECK: Intrinsic has incorrect argument type! ; CHECK-NEXT: (*, i32, <4 x i1>, )* @llvm.masked.load.nxv4i32.p0nxv4i32 diff --git a/llvm/test/Verifier/invalid-eh.ll b/llvm/test/Verifier/invalid-eh.ll --- a/llvm/test/Verifier/invalid-eh.ll +++ b/llvm/test/Verifier/invalid-eh.ll @@ -4,28 +4,28 @@ ; RUN: sed -e s/.T2:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s ; RUN: sed -e s/.T3:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK3 %s ; RUN: sed -e s/.T4:// %s | not llvm-as -disable-output 2>&1 | FileCheck --check-prefix=CHECK4 %s -; RUN: sed -e s/.T5:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK5 %s -; RUN: sed -e s/.T6:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK6 %s -; RUN: sed -e s/.T7:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK7 %s -; RUN: sed -e s/.T8:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK8 %s -; RUN: sed -e s/.T9:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK9 %s -; RUN: sed -e s/.T10:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK10 %s -; RUN: sed -e s/.T11:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK11 %s -; RUN: sed -e s/.T12:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK12 %s -; RUN: sed -e s/.T13:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK13 %s -; RUN: sed -e s/.T14:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK14 %s -; RUN: sed -e s/.T15:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK15 %s -; RUN: sed -e s/.T16:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK16 %s -; RUN: sed -e s/.T17:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK17 %s -; RUN: sed -e s/.T18:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK18 %s -; RUN: sed -e s/.T19:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK19 %s -; RUN: sed -e s/.T20:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK20 %s -; RUN: sed -e s/.T21:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK21 %s -; RUN: sed -e s/.T22:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK22 %s -; RUN: sed -e s/.T23:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK23 %s -; RUN: sed -e s/.T24:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK24 %s -; RUN: sed -e s/.T25:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK25 %s -; RUN: sed -e s/.T26:// %s | not opt -verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK26 %s +; RUN: sed -e s/.T5:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK5 %s +; RUN: sed -e s/.T6:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK6 %s +; RUN: sed -e s/.T7:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK7 %s +; RUN: sed -e s/.T8:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK8 %s +; RUN: sed -e s/.T9:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK9 %s +; RUN: sed -e s/.T10:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK10 %s +; RUN: sed -e s/.T11:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK11 %s +; RUN: sed -e s/.T12:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK12 %s +; RUN: sed -e s/.T13:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK13 %s +; RUN: sed -e s/.T14:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK14 %s +; RUN: sed -e s/.T15:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK15 %s +; RUN: sed -e s/.T16:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK16 %s +; RUN: sed -e s/.T17:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK17 %s +; RUN: sed -e s/.T18:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK18 %s +; RUN: sed -e s/.T19:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK19 %s +; RUN: sed -e s/.T20:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK20 %s +; RUN: sed -e s/.T21:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK21 %s +; RUN: sed -e s/.T22:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK22 %s +; RUN: sed -e s/.T23:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK23 %s +; RUN: sed -e s/.T24:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK24 %s +; RUN: sed -e s/.T25:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK25 %s +; RUN: sed -e s/.T26:// %s | not opt -passes=verify -disable-output 2>&1 | FileCheck --check-prefix=CHECK26 %s declare void @g() diff --git a/llvm/test/Verifier/invalid-splice.ll b/llvm/test/Verifier/invalid-splice.ll --- a/llvm/test/Verifier/invalid-splice.ll +++ b/llvm/test/Verifier/invalid-splice.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify -S < %s 2>&1 >/dev/null | FileCheck %s +; RUN: not opt -passes=verify -S < %s 2>&1 >/dev/null | FileCheck %s ; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector define <2 x double> @splice_v2f64_idx_neg3(<2 x double> %a, <2 x double> %b) #0 { diff --git a/llvm/test/Verifier/invalid-statepoint.ll b/llvm/test/Verifier/invalid-statepoint.ll --- a/llvm/test/Verifier/invalid-statepoint.ll +++ b/llvm/test/Verifier/invalid-statepoint.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify 2>&1 < %s | FileCheck %s +; RUN: not opt -passes=verify 2>&1 < %s | FileCheck %s declare zeroext i1 @return0i1() diff --git a/llvm/test/Verifier/kcfi-operand-bundles.ll b/llvm/test/Verifier/kcfi-operand-bundles.ll --- a/llvm/test/Verifier/kcfi-operand-bundles.ll +++ b/llvm/test/Verifier/kcfi-operand-bundles.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s define void @test_kcfi_bundle(i64 %arg0, i32 %arg1, void()* %arg2) { ; CHECK: Multiple kcfi operand bundles diff --git a/llvm/test/Verifier/llvm.fptrunc.round.ll b/llvm/test/Verifier/llvm.fptrunc.round.ll --- a/llvm/test/Verifier/llvm.fptrunc.round.ll +++ b/llvm/test/Verifier/llvm.fptrunc.round.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s declare half @llvm.fptrunc.round(float, metadata) diff --git a/llvm/test/Verifier/memcpy-inline.ll b/llvm/test/Verifier/memcpy-inline.ll --- a/llvm/test/Verifier/memcpy-inline.ll +++ b/llvm/test/Verifier/memcpy-inline.ll @@ -1,6 +1,6 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s -; CHECK: alignment is not a power of two +; CHECK: alignment is not a power of two define void @foo(i8* %P, i8* %Q) { call void @llvm.memcpy.inline.p0i8.p0i8.i32(i8* align 3 %P, i8* %Q, i32 4, i1 false) diff --git a/llvm/test/Verifier/memcpy.ll b/llvm/test/Verifier/memcpy.ll --- a/llvm/test/Verifier/memcpy.ll +++ b/llvm/test/Verifier/memcpy.ll @@ -1,6 +1,6 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s -; CHECK: alignment is not a power of two +; CHECK: alignment is not a power of two define void @foo(i8* %P, i8* %Q) { call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 3 %P, i8* %Q, i32 4, i1 false) diff --git a/llvm/test/Verifier/memset-inline.ll b/llvm/test/Verifier/memset-inline.ll --- a/llvm/test/Verifier/memset-inline.ll +++ b/llvm/test/Verifier/memset-inline.ll @@ -1,6 +1,6 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s -; CHECK: alignment is not a power of two +; CHECK: alignment is not a power of two define void @foo(i8* %P, i8 %value) { call void @llvm.memset.inline.p0i8.i32(i8* align 3 %P, i8 %value, i32 4, i1 false) diff --git a/llvm/test/Verifier/opaque-ptr-invalid.ll b/llvm/test/Verifier/opaque-ptr-invalid.ll --- a/llvm/test/Verifier/opaque-ptr-invalid.ll +++ b/llvm/test/Verifier/opaque-ptr-invalid.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify -opaque-pointers < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify -opaque-pointers < %s 2>&1 | FileCheck %s ; CHECK: Attribute 'inalloca' does not support unsized types! ; CHECK-NEXT: ptr @f diff --git a/llvm/test/Verifier/operand-bundles.ll b/llvm/test/Verifier/operand-bundles.ll --- a/llvm/test/Verifier/operand-bundles.ll +++ b/llvm/test/Verifier/operand-bundles.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s %0 = type opaque declare void @g() diff --git a/llvm/test/Verifier/preallocated-invalid.ll b/llvm/test/Verifier/preallocated-invalid.ll --- a/llvm/test/Verifier/preallocated-invalid.ll +++ b/llvm/test/Verifier/preallocated-invalid.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S %s -verify 2>&1 | FileCheck %s +; RUN: not opt -S %s -passes=verify 2>&1 | FileCheck %s declare token @llvm.call.preallocated.setup(i32) declare i8* @llvm.call.preallocated.arg(token, i32) diff --git a/llvm/test/Verifier/ptrauth-operand-bundles.ll b/llvm/test/Verifier/ptrauth-operand-bundles.ll --- a/llvm/test/Verifier/ptrauth-operand-bundles.ll +++ b/llvm/test/Verifier/ptrauth-operand-bundles.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s declare void @g() diff --git a/llvm/test/Verifier/reduction-intrinsics.ll b/llvm/test/Verifier/reduction-intrinsics.ll --- a/llvm/test/Verifier/reduction-intrinsics.ll +++ b/llvm/test/Verifier/reduction-intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s ; Reject a vector reduction with a non-vector argument. diff --git a/llvm/test/Verifier/sat-intrinsics.ll b/llvm/test/Verifier/sat-intrinsics.ll --- a/llvm/test/Verifier/sat-intrinsics.ll +++ b/llvm/test/Verifier/sat-intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s define i32 @sadd_arg_int(float %x, i32 %y) { ; CHECK: Intrinsic has incorrect argument type! diff --git a/llvm/test/Verifier/scalable-global-vars.ll b/llvm/test/Verifier/scalable-global-vars.ll --- a/llvm/test/Verifier/scalable-global-vars.ll +++ b/llvm/test/Verifier/scalable-global-vars.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s ;; Global variables cannot be scalable vectors, since we don't ;; know the size at compile time. diff --git a/llvm/test/Verifier/scalable-vector-struct-alloca.ll b/llvm/test/Verifier/scalable-vector-struct-alloca.ll --- a/llvm/test/Verifier/scalable-vector-struct-alloca.ll +++ b/llvm/test/Verifier/scalable-vector-struct-alloca.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s define void @alloca() { ; CHECK: error: Cannot allocate unsized type diff --git a/llvm/test/Verifier/scalable-vector-struct-load.ll b/llvm/test/Verifier/scalable-vector-struct-load.ll --- a/llvm/test/Verifier/scalable-vector-struct-load.ll +++ b/llvm/test/Verifier/scalable-vector-struct-load.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s define @load({ i32, }* %x) { ; CHECK: error: loading unsized types is not allowed diff --git a/llvm/test/Verifier/scalable-vector-struct-store.ll b/llvm/test/Verifier/scalable-vector-struct-store.ll --- a/llvm/test/Verifier/scalable-vector-struct-store.ll +++ b/llvm/test/Verifier/scalable-vector-struct-store.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s define void @store({ i32, }* %x, i32 %y, %z) { ; CHECK: error: storing unsized types is not allowed diff --git a/llvm/test/Verifier/scatter_gather.ll b/llvm/test/Verifier/scatter_gather.ll --- a/llvm/test/Verifier/scatter_gather.ll +++ b/llvm/test/Verifier/scatter_gather.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s ; Mask is not a vector ; CHECK: Intrinsic has incorrect argument type! @@ -56,7 +56,7 @@ } declare <8 x float> @llvm.masked.gather.v8f32.v16p0f32(<16 x float*>, i32, <8 x i1>, <8 x float>) -; Passthru type doesn't match return type +; Passthru type doesn't match return type ; CHECK: Intrinsic has incorrect argument type! define <16 x i32> @gather9(<16 x i32*> %ptrs, <16 x i1> %mask, <8 x i32> %passthru) { %res = call <16 x i32> @llvm.masked.gather.v16i32.v16p0i32(<16 x i32*> %ptrs, i32 4, <16 x i1> %mask, <8 x i32> %passthru) diff --git a/llvm/test/Verifier/stepvector-intrinsic.ll b/llvm/test/Verifier/stepvector-intrinsic.ll --- a/llvm/test/Verifier/stepvector-intrinsic.ll +++ b/llvm/test/Verifier/stepvector-intrinsic.ll @@ -1,4 +1,4 @@ -; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s ; Reject stepvector intrinsics that return a scalar diff --git a/llvm/test/Verifier/swifttailcc-musttail.ll b/llvm/test/Verifier/swifttailcc-musttail.ll --- a/llvm/test/Verifier/swifttailcc-musttail.ll +++ b/llvm/test/Verifier/swifttailcc-musttail.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify %s 2>&1 | FileCheck %s declare swifttailcc void @simple() diff --git a/llvm/test/Verifier/tailcc-musttail.ll b/llvm/test/Verifier/tailcc-musttail.ll --- a/llvm/test/Verifier/tailcc-musttail.ll +++ b/llvm/test/Verifier/tailcc-musttail.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify %s 2>&1 | FileCheck %s declare tailcc void @simple() diff --git a/llvm/test/Verifier/unsized-types-alloca.ll b/llvm/test/Verifier/unsized-types-alloca.ll --- a/llvm/test/Verifier/unsized-types-alloca.ll +++ b/llvm/test/Verifier/unsized-types-alloca.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s %X = type opaque diff --git a/llvm/test/Verifier/unsized-types-load.ll b/llvm/test/Verifier/unsized-types-load.ll --- a/llvm/test/Verifier/unsized-types-load.ll +++ b/llvm/test/Verifier/unsized-types-load.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s %X = type opaque diff --git a/llvm/test/Verifier/unsized-types-store.ll b/llvm/test/Verifier/unsized-types-store.ll --- a/llvm/test/Verifier/unsized-types-store.ll +++ b/llvm/test/Verifier/unsized-types-store.ll @@ -1,4 +1,4 @@ -; RUN: not opt -verify < %s 2>&1 | FileCheck %s +; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s %X = type opaque diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -87,12 +87,6 @@ static cl::alias PassPipeline2("p", cl::aliasopt(PassPipeline), cl::desc("Alias for -passes")); -static cl::opt TemporarilyAllowOldPassesSyntax( - "temporarily-allow-old-pass-syntax", - cl::desc("Do not use in new tests. To be removed once all tests have " - "migrated."), - cl::init(false)); - static cl::opt PrintPasses("print-passes", cl::desc("Print available passes that can be " "specified in -passes=foo and exit")); @@ -487,6 +481,15 @@ const bool UseNPM = (EnableNewPassManager && !shouldForceLegacyPM()) || PassPipeline.getNumOccurrences() > 0; + if (UseNPM && !PassList.empty()) { + errs() << "The `opt -passname` syntax for the new pass manager is " + "not supported, please use `opt -passes=` (or the `-p` " + "alias for a more concise version).\n"; + errs() << "See https://llvm.org/docs/NewPassManager.html#invoking-opt " + "for more details on the pass pipeline syntax.\n\n"; + return 1; + } + if (!UseNPM && PluginList.size()) { errs() << argv[0] << ": " << PassPlugins.ArgStr << " specified with legacy PM.\n"; @@ -678,15 +681,6 @@ "-passes='default,other-pass'\n"; return 1; } - if (!PassList.empty()) { - errs() << "The `opt -passname` syntax for the new pass manager is " - "deprecated, please use `opt -passes=` (or the `-p` " - "alias for a more concise version).\n"; - errs() << "See https://llvm.org/docs/NewPassManager.html#invoking-opt " - "for more details on the pass pipeline syntax.\n\n"; - if (!TemporarilyAllowOldPassesSyntax) - return 1; - } std::string Pipeline = PassPipeline; SmallVector Passes;