-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
%struct.BLEND_MAP = type { i16, i16, i16, i32, %struct.BLEND_MAP_ENTRY* }
%struct.BLEND_MAP_ENTRY = type { float, i8, { [5 x float], [4 x i8] } }
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
define void @init_caller_save() {
entry:
; PR1333
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "i686-pc-linux-gnu"
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
; PR1333
define void @pp_cxx_expression() {
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -instcombine -disable-output
+; RUN: opt < %s -passes='loop(simple-loop-unswitch),instcombine' -verify-memoryssa -disable-output
@str3 = external constant [3 x i8] ; <[3 x i8]*> [#uses=1]
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
define i32 @main(i32 %argc, i8** %argv) {
entry:
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
; PR1559
target triple = "i686-pc-linux-gnu"
-; RUN: opt < %s -licm -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=licm,simple-loop-unswitch -disable-output
; PR 1589
%struct.QBasicAtomic = type { i32 }
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -instcombine -disable-output
+; RUN: opt < %s -passes='loop(simple-loop-unswitch),instcombine' -verify-memoryssa -disable-output
%struct.ClassDef = type { %struct.QByteArray, %struct.QByteArray, %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", i8, i8, %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QList<ArgumentDef>", %"struct.QMap<QByteArray,QByteArray>", %"struct.QList<ArgumentDef>", %"struct.QMap<QByteArray,QByteArray>", i32, i32 }
%struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i32, i32, [40 x i8] }
%struct.Generator = type { %struct.FILE*, %struct.ClassDef*, %"struct.QList<ArgumentDef>", %struct.QByteArray, %"struct.QList<ArgumentDef>" }
-; RUN: opt < %s -licm -loop-unroll -disable-output
+; RUN: opt < %s -passes='loop-mssa(licm),loop-unroll' -disable-output
@resonant = external global i32 ; <i32*> [#uses=2]
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -instcombine -gvn -disable-output
+; RUN: opt < %s -passes='loop(simple-loop-unswitch),instcombine,gvn' -verify-memoryssa -disable-output
; PR2372
target triple = "i386-pc-linux-gnu"
-; RUN: opt < %s -licm -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=licm,simple-loop-unswitch -disable-output
@g_56 = external global i16 ; <i16*> [#uses=2]
define i32 @func_67(i32 %p_68, i8 signext %p_69, i8 signext %p_71) nounwind {
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa
; PR8622
@g_38 = external global i32, align 4
-; RUN: opt -simple-loop-unswitch -verify-memoryssa -disable-output < %s
+; RUN: opt -passes=simple-loop-unswitch -verify-memoryssa -disable-output < %s
; PR10031
define i32 @test(i32 %command) {
-; RUN: opt < %s -S -simple-loop-unswitch -verify-loop-info -verify-dom-info -verify-memoryssa | FileCheck %s
-; PR12343: -simple-loop-unswitch crash on indirect branch
+; RUN: opt < %s -S -passes=simple-loop-unswitch -verify-loop-info -verify-dom-info -verify-memoryssa | FileCheck %s
+; PR12343: -passes=simple-loop-unswitch crash on indirect branch
; CHECK: %0 = icmp eq i64 undef, 0
; CHECK-NEXT: br i1 %0, label %"5", label %"4"
-; RUN: opt < %s -instcombine -inline -function-attrs -licm -simple-loop-unswitch -gvn -verify
+; RUN: opt < %s -passes='function(instcombine),cgscc(inline),function-attrs,function(loop-mssa(licm),simple-loop-unswitch,gvn,verify)'
; PR12573
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-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
; PR12887
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-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -S | FileCheck %s
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -S | FileCheck %s
; In cases where two address spaces do not have the same size pointer, the
; input for the addrspacecast should not be used as a substitute for itself
br i1 undef, label %for.body.i, label %bar.exit
for.body.i: ; preds = %for.body.i, %entry
-; When we call makeLoopInvariant (i.e. trivial LICM) on this load, it
+; When we call makeLoopInvariant (i.e. trivial LICM) on this load, it
; will try to find the base object to prove deferenceability. If we look
; through the addrspacecast, we'll fail an assertion about bitwidths matching
; CHECK-LABEL: for.body.i
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -mtriple=thumbv8m.main -simple-loop-unswitch -enable-nontrivial-unswitch -unswitch-threshold=5 -S -o - %s | FileCheck %s
+; RUN: opt -mtriple=thumbv8m.main -passes='simple-loop-unswitch<nontrivial>' -unswitch-threshold=5 -S -o - %s | FileCheck %s
declare void @a()
declare void @b()
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -S 2>&1 | FileCheck %s
; This is to test trivial loop unswitch only happens when trivial condition
; itself is an LIV loop condition (not partial LIV which could occur in and/or).
ret i32 0
}
-declare void @some_func() noreturn
+declare void @some_func() noreturn
-; RUN: opt -passes=simple-loop-unswitch -enable-nontrivial-unswitch < %s -S | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' < %s -S | FileCheck %s
; CHECK: if.end{{.*}}:
; CHECK-NOT: if.end{{.*}}:
-; RUN: opt -S -simple-loop-unswitch -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -passes=simple-loop-unswitch -verify-memoryssa < %s | FileCheck %s
target triple = "x86_64-pc-win32"
define void @f(i32 %doit, i1 %x, i1 %y) personality i32 (...)* @__CxxFrameHandler3 {
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -S | FileCheck %s
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -S | FileCheck %s
; This test checks if unswitched condition preserve make.implicit metadata.
define i32 @test(i1 %cond) {
-; RUN: opt < %s -simple-loop-unswitch -verify-memoryssa -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -verify-memoryssa -disable-output
define void @test1(i32* %S2) {
entry:
; REQUIRES: asserts
; RUN: opt < %s -passes='simple-loop-unswitch<nontrivial>' -disable-output
-; RUN: opt < %s -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output
; Make sure we don't crash due to a dangling use of %tmp2 in bb7.
-; RUN: opt < %s -simple-loop-unswitch -enable-nontrivial-unswitch -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='simple-loop-unswitch<nontrivial>' -S 2>&1 | FileCheck %s
; RUN: opt < %s -passes='simple-loop-unswitch<nontrivial>' -S 2>&1 | FileCheck %s
; RUN: opt < %s -passes='loop-mssa(simple-loop-unswitch<nontrivial>)' -S 2>&1 | FileCheck %s
;
br label %inner
inner:
%ii = phi i32 [ 0, %outer ], [ %iinc, %continue]
- call void @foo()
+ call void @foo()
switch i32 %0, label %get_out2 [
i32 0, label %continue
i32 1, label %case1
-; RUN: opt -simple-loop-unswitch -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes=simple-loop-unswitch -verify-memoryssa -S < %s | FileCheck %s
define void @f(i32 %n, i32* %ptr) {
; CHECK-LABEL: @f(
-; RUN: opt < %s -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -disable-output
; PR38283
; PR38737
-; RUN: opt < %s -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -disable-output
; PR38283
; PR38737
-; RUN: opt < %s -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=simple-loop-unswitch -disable-output
; PR38283
; PR38737
; RUN: opt -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -simple-loop-unswitch-guards -S < %s | FileCheck %s
-; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -simple-loop-unswitch-guards -S < %s | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -simple-loop-unswitch-guards -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -simple-loop-unswitch-guards -verify-memoryssa -S < %s | FileCheck %s
declare void @llvm.experimental.guard(i1, ...)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -enable-nontrivial-unswitch=true -simple-loop-unswitch -S < %s | FileCheck %s
-; RUN: opt -enable-nontrivial-unswitch=true -passes='loop(simple-loop-unswitch),verify<loops>' -S < %s | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -S < %s | FileCheck %s
+; RUN: opt -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
declare void @may_exit()
declare void @throw_npe()
; REQUIRES: asserts
-; RUN: opt -simple-loop-unswitch -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
-; RUN: opt -simple-loop-unswitch -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes=simple-loop-unswitch -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
+; RUN: opt -passes=simple-loop-unswitch -verify-memoryssa -S < %s | FileCheck %s
; PR5373
; Loop unswitching shouldn't trivially unswitch the true case of condition %a
;
; RUN: opt -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -unswitch-threshold=5 -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -unswitch-threshold=5 -S < %s | FileCheck %s
-; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -unswitch-threshold=5 -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -unswitch-threshold=5 -verify-memoryssa -S < %s | FileCheck %s
declare void @a()
declare void @b()
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -freeze-loop-unswitch-cond -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
; RUN: opt -freeze-loop-unswitch-cond -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
-; RUN: opt -freeze-loop-unswitch-cond -simple-loop-unswitch -enable-nontrivial-unswitch -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -freeze-loop-unswitch-cond -passes='simple-loop-unswitch<nontrivial>' -verify-memoryssa -S < %s | FileCheck %s
declare i32 @a()
declare i32 @b()
; REQUIRES: asserts
; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -disable-output -S < %s
; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>)' -disable-output -S < %s
-; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -disable-output -S < %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -disable-output -S < %s
; This loop shouldn't trigger asserts in SimpleLoopUnswitch.
define void @test_redundant_switch(i1* %ptr, i32 %cond) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
-; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -verify-memoryssa -S < %s | FileCheck %s
declare ptr @pluto()
declare void @llvm.experimental.guard(i1, ...)
; RUN: opt -passes='loop(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(simple-loop-unswitch<nontrivial>),verify<loops>' -S < %s | FileCheck %s
-; RUN: opt -simple-loop-unswitch -enable-nontrivial-unswitch -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' -verify-memoryssa -S < %s | FileCheck %s
declare i32 @a()
declare i32 @b()
-; RUN: opt -simple-loop-unswitch -verify-memoryssa -loop-deletion -S < %s | FileCheck %s
+; RUN: opt -passes=simple-loop-unswitch,loop-deletion -verify-memoryssa -S < %s | FileCheck %s
;
; Check that when we do unswitching where we re-enqueue the loop to be processed
; again, but manage to delete the loop before ever getting to iterate on it, it
-; RUN: opt -simple-loop-unswitch -verify-loop-info -verify-dom-info -verify-memoryssa -disable-output < %s
+; RUN: opt -passes=simple-loop-unswitch -verify-loop-info -verify-dom-info -verify-memoryssa -disable-output < %s
; Loop unswitch should be able to unswitch these loops and
; preserve LCSSA and LoopSimplify forms.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; We run -indvars before -simple-loop-unswitch to compute SCEV exit counts before
+; We run -indvars before -passes=simple-loop-unswitch to compute SCEV exit counts before
; running -simple-loop-unswitch.
-; RUN: opt -indvars -simple-loop-unswitch -S %s -verify-scev | FileCheck %s
+; RUN: opt -passes=indvars,simple-loop-unswitch -S %s -verify-scev | FileCheck %s
; Test for PR43972.