; Inlining used to break PHI nodes. This tests that they are correctly updated
; when a node is split around the call instruction. The verifier caught the error.
;
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline
+; RUN: opt < %s -passes='cgscc(inline)'
;
define i64 @test(i64 %X) {
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -simple-loop-unswitch -indvars -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch,indvars -disable-output
; Require SCEV before LCSSA.
define void @foo() {
entry:
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -loop-unroll -loop-rotate -simplifycfg -disable-output
+; RUN: opt < %s -passes=loop-unroll,loop-rotate,simplifycfg -disable-output
; PR2028
define i32 @test1() {
ret i32 0
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -instcombine -S | grep true
+; RUN: opt < %s -passes=instcombine -S | grep true
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -internalize -disable-output
+; RUN: opt < %s -passes='cgscc(inline)',internalize -disable-output
define void @foo() nounwind {
ret void
}
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -verify -S | grep noimplicitfloat
+; RUN: opt < %s -passes=verify -S | grep noimplicitfloat
declare void @f() noimplicitfloat
; REQUIRES: asserts
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -div-rem-pairs -debug-counter=div-rem-pairs-transform-skip=1,div-rem-pairs-transform-count=1 \
+; RUN: opt < %s -passes=div-rem-pairs -debug-counter=div-rem-pairs-transform-skip=1,div-rem-pairs-transform-count=1 \
; RUN: -S -mtriple=x86_64-unknown-unknown | FileCheck %s
;; Test that, with debug counters on, we only skip the first div-rem-pairs opportunity, optimize one after it,
;; and then ignore all the others. There is 1 optimization opportunity in f1, 2 in f2, and another 1 in f3,
; REQUIRES: asserts
-; RUN: opt -temporarily-allow-old-pass-syntax -S -debug-counter=partially-inline-libcalls-transform-skip=1,partially-inline-libcalls-transform-count=1 \
-; RUN: -partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: opt -S -debug-counter=partially-inline-libcalls-transform-skip=1,partially-inline-libcalls-transform-count=1 \
+; RUN: -passes=partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
;; Test that, with debug counters on, we will skip the first optimization opportunity, perform next 1,
;; and ignore all the others left.
-;RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-weights -cfg-dot-filename-prefix=%t 2>/dev/null > /dev/null
+;RUN: opt < %s -passes=dot-cfg -cfg-weights -cfg-dot-filename-prefix=%t 2>/dev/null > /dev/null
;RUN: FileCheck %s -input-file=%t.f.dot
define void @f(i32) {
-;RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-weights -cfg-raw-weights -cfg-dot-filename-prefix=%t 2>/dev/null > /dev/null
+;RUN: opt < %s -passes=dot-cfg -cfg-weights -cfg-raw-weights -cfg-dot-filename-prefix=%t 2>/dev/null > /dev/null
;RUN: FileCheck %s -input-file=%t.f.dot
define void @f(i32) {
; RUN: rm -f %t.other.dot %t-only.other.dot
;; Both f and func are dumped because their names contain the pattern 'f' as a substring.
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg -cfg-dot-filename-prefix=%t -cfg-func-name=f 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t.f.dot -check-prefix=F
; RUN: FileCheck %s -input-file=%t.func.dot -check-prefix=Func
; RUN: not test -f %t.other.dot
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg-only -cfg-dot-filename-prefix=%t-only -cfg-func-name=f 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg-only -cfg-dot-filename-prefix=%t-only -cfg-func-name=f 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t-only.f.dot -check-prefix=F
; RUN: FileCheck %s -input-file=%t-only.func.dot -check-prefix=Func
; RUN: not test -f %t-only.other.dot
; RUN: rm -rf %t
; RUN: mkdir -p %t
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-hide-unreachable-paths -cfg-dot-filename-prefix=%t/unreach 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg -cfg-hide-unreachable-paths -cfg-dot-filename-prefix=%t/unreach 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t/unreach.callee.dot -check-prefix=UNREACH
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/deopt -temporarily-allow-old-pass-syntax 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/deopt 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t/deopt.callee.dot -check-prefix=DEOPT
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-dot-filename-prefix=%t/no-flags 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg -cfg-dot-filename-prefix=%t/no-flags 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t/no-flags.callee.dot -check-prefix=NO-FLAGS
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -dot-cfg -cfg-hide-unreachable-paths -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/both-flags 2>/dev/null > /dev/null
+; RUN: opt < %s -passes=dot-cfg -cfg-hide-unreachable-paths -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/both-flags 2>/dev/null > /dev/null
; RUN: FileCheck %s -input-file=%t/both-flags.callee.dot -check-prefix=BOTH-FLAGS
declare i8 @llvm.experimental.deoptimize.i8(...)
; "PLAIN" - No optimizations. This tests the default target layout
; constant folder.
-; RUN: opt -temporarily-allow-old-pass-syntax -S -o - < %s | FileCheck --check-prefix=PLAIN %s
+; RUN: opt -S -o - < %s | FileCheck --check-prefix=PLAIN %s
; "OPT" - Optimizations but no targetdata. This tests default target layout
; folding in the optimizers.
-; RUN: opt -temporarily-allow-old-pass-syntax -S -o - -instcombine -globalopt -temporarily-allow-old-pass-syntax < %s | FileCheck --check-prefix=OPT %s
+; RUN: opt -S -o - -passes='function(instcombine),globalopt' < %s | FileCheck --check-prefix=OPT %s
; "TO" - Optimizations and targetdata. This tests target-dependent
; folding in the optimizers.
-; RUN: opt -temporarily-allow-old-pass-syntax -S -o - -instcombine -globalopt -temporarily-allow-old-pass-syntax -data-layout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" < %s | FileCheck --check-prefix=TO %s
+; RUN: opt -S -o - -passes='function(instcombine),globalopt' -data-layout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" < %s | FileCheck --check-prefix=TO %s
; "SCEV" - ScalarEvolution with default target layout
-; RUN: opt -temporarily-allow-old-pass-syntax -passes='print<scalar-evolution>' < %s -disable-output 2>&1 | FileCheck --check-prefix=SCEV %s
+; RUN: opt -passes='print<scalar-evolution>' < %s -disable-output 2>&1 | FileCheck --check-prefix=SCEV %s
-; The automatic constant folder in opt -temporarily-allow-old-pass-syntax does not have targetdata access, so
+; The automatic constant folder in opt does not have targetdata access, so
; it can't fold gep arithmetic, in general. However, the constant folder run
-; from instcombine and global opt -temporarily-allow-old-pass-syntax can use targetdata.
+; from instcombine and global opt can use targetdata.
; PLAIN: @G8 = global i8* getelementptr (i8, i8* inttoptr (i32 1 to i8*), i32 -1)
; PLAIN: @G1 = global i1* getelementptr (i1, i1* inttoptr (i32 1 to i1*), i32 -1)
-; RUN: opt -temporarily-allow-old-pass-syntax -run-twice -verify -S -o - %s | FileCheck %s
+; RUN: opt -run-twice -passes=verify -S -o - %s | FileCheck %s
; This test is used to check metadata attached to global variable declarations
; are copied when CloneModule(). This is required by out-of-tree passes.
; REQUIRES: asserts
-; RUN: opt -temporarily-allow-old-pass-syntax -dce -S -debug-counter=dce-transform-skip=1,dce-transform-count=2 < %s | FileCheck %s
+; RUN: opt -passes=dce -S -debug-counter=dce-transform-skip=1,dce-transform-count=2 < %s | FileCheck %s
;; Test that, with debug counters on, we will skip the first DCE opportunity, perform next 2,
;; and ignore all the others left.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: asserts
-; RUN: opt -temporarily-allow-old-pass-syntax -S -debug-counter=newgvn-vn-skip=1,newgvn-vn-count=2 -newgvn < %s 2>&1 | FileCheck %s
+; RUN: opt -S -debug-counter=newgvn-vn-skip=1,newgvn-vn-count=2 -passes=newgvn < %s 2>&1 | FileCheck %s
;; Test that, with debug counters on, we don't value number the first instruction, only the second and third,
;; which means we do not discover the return is constant.
define i32 @vntest() {
-; RUN: opt -temporarily-allow-old-pass-syntax %s -dot-cfg -cfg-heat-colors -cfg-dot-filename-prefix=%t -disable-output
+; RUN: opt %s -passes=dot-cfg -cfg-heat-colors -cfg-dot-filename-prefix=%t -disable-output
; RUN: FileCheck %s -input-file=%t.f.dot --check-prefixes=CHECK-CFG,CHECK-BOTH
-; RUN: opt -temporarily-allow-old-pass-syntax %s -dot-callgraph -callgraph-heat-colors -callgraph-dot-filename-prefix=%t -disable-output
+; RUN: opt %s -passes=dot-callgraph -callgraph-heat-colors -callgraph-dot-filename-prefix=%t -disable-output
; RUN: FileCheck %s -input-file=%t.callgraph.dot --check-prefix=CHECK-BOTH
; CHECK-BOTH: color="#[[#%x,]]", style={{[a-z]+}}, fillcolor="#[[#%x,]]"
-; RUN: opt -temporarily-allow-old-pass-syntax %s -dot-callgraph -callgraph-multigraph -callgraph-dot-filename-prefix=%t -disable-output
+; RUN: opt %s -passes=dot-callgraph -callgraph-multigraph -callgraph-dot-filename-prefix=%t -disable-output
; RUN: FileCheck %s -input-file=%t.callgraph.dot --check-prefix=CHECK-MULTIGRAPH
-; RUN: opt -temporarily-allow-old-pass-syntax %s -dot-callgraph -callgraph-dot-filename-prefix=%t -disable-output
+; RUN: opt %s -passes=dot-callgraph -callgraph-dot-filename-prefix=%t -disable-output
; RUN: FileCheck %s -input-file=%t.callgraph.dot --check-prefix=CHECK
; CHECK-MULTIGRAPH: {external caller}
; Check pass name is only printed once.
; Check only one function is printed
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all -filter-print-funcs=foo | FileCheck %s -check-prefix=FOO
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo | FileCheck %s -check-prefix=FOO
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo | FileCheck %s -check-prefix=FOO
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo | FileCheck %s -check-prefix=FOO
; Check pass name is only printed once.
; Check both functions are printed
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all -filter-print-funcs=foo,bar | FileCheck %s -check-prefix=BOTH
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo,bar | FileCheck %s -check-prefix=BOTH
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo,bar | FileCheck %s -check-prefix=BOTH
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo,bar | FileCheck %s -check-prefix=BOTH
; Check pass name is not printed if a module/SCC doesn't include any function specified in -filter-print-funcs.
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=no-op-cgscc -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
+; RUN: opt < %s 2>&1 -passes=no-op-cgscc -disable-output -print-after-all -filter-print-funcs=baz | FileCheck %s -allow-empty -check-prefix=EMPTY
; Check whole module is printed with user-specified wildcast switch -filter-print-funcs=* or -print-module-scope
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all | FileCheck %s -check-prefix=ALL
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all -filter-print-funcs=* | FileCheck %s -check-prefix=ALL
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -forceattrs -disable-output -print-after-all -filter-print-funcs=foo -print-module-scope | FileCheck %s -check-prefix=ALL
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all | FileCheck %s -check-prefix=ALL
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=* | FileCheck %s -check-prefix=ALL
-; RUN: opt -temporarily-allow-old-pass-syntax < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo -print-module-scope | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=* | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo -print-module-scope | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=* | FileCheck %s -check-prefix=ALL
+; RUN: opt < %s 2>&1 -passes=forceattrs -disable-output -print-after-all -filter-print-funcs=foo -print-module-scope | FileCheck %s -check-prefix=ALL
; FOO: IR Dump After {{Force set function attributes|ForceFunctionAttrsPass}}
; FOO: define void @foo
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -pass-remarks='inline' -S 2>&1 | FileCheck %s
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inline' -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
; These two should not yield an inline remark for the same reason.
; In the first command, we only ask for vectorizer remarks, in the
; second one we ask for the inliner, but we then ask for the vectorizer
; (thus overriding the first flag).
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+; RUN: opt < %s -passes='cgscc(inline)' -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
-; RUN: opt -temporarily-allow-old-pass-syntax < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s
-; RUN: not opt -temporarily-allow-old-pass-syntax < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
+; RUN: opt < %s -passes='cgscc(inline)' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
define i32 @foo(i32 %x, i32 %y) #0 {
entry:
-; RUN: opt -temporarily-allow-old-pass-syntax -S -O1 < %s -o %t1.ll
-; RUN: opt -temporarily-allow-old-pass-syntax -S < %t1.ll -o %t2.ll
-; RUN: opt -temporarily-allow-old-pass-syntax -S -simplifycfg < %t1.ll -o %t3.ll
+; RUN: opt -S -O1 < %s -o %t1.ll
+; RUN: opt -S < %t1.ll -o %t2.ll
+; RUN: opt -S -passes=simplifycfg < %t1.ll -o %t3.ll
;; Show that there's no difference after running another simplify CFG
; RUN: diff %t2.ll %t3.ll
; REQUIRES: asserts
-; RUN: opt -temporarily-allow-old-pass-syntax -S -debug-counter=early-cse-skip=1,early-cse-count=1 -early-cse -earlycse-debug-hash \
-; RUN: -debug-counter=newgvn-vn-skip=1,newgvn-vn-count=2 -newgvn \
-; RUN: -instcombine -print-debug-counter < %s 2>&1 | FileCheck %s
+; RUN: opt -S -debug-counter=early-cse-skip=1,early-cse-count=1 -passes=early-cse,newgvn,instcombine -earlycse-debug-hash \
+; RUN: -debug-counter=newgvn-vn-skip=1,newgvn-vn-count=2 \
+; RUN: -print-debug-counter < %s 2>&1 | FileCheck %s
;; Test debug counter prints correct info in right order.
; CHECK-LABEL: Counters and values:
; CHECK: early-cse
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -temporarily-allow-old-pass-syntax -S -verify < %s 2>&1 | FileCheck %s
+; RUN: opt -S -passes=verify < %s 2>&1 | FileCheck %s
; Make sure we allow scalable vectors in structs for returning multiple
; values from intrinsics.
-; RUN: opt -temporarily-allow-old-pass-syntax -S -verify < %s | FileCheck %s
+; RUN: opt -S -passes=verify < %s | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"