-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -passes=licm -disable-output
;%MoveArray = external global [64 x ulong]
; Exit blocks need to be updated for all nested loops...
-; RUN: opt < %s -loop-simplify
+; RUN: opt < %s -passes=loop-simplify
define i32 @yyparse() {
bb0:
-; This testcase fails because preheader insertion is not updating exit node
+; This testcase fails because preheader insertion is not updating exit node
; information for loops.
-; RUN: opt < %s -licm
+; RUN: opt < %s -passes=licm
define i32 @main(i32 %argc, ptr %argv) {
bb0:
; happens because preheader insertion doesn't insert a preheader for this
; case... bad.
-; RUN: opt < %s -licm -loop-deletion -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | \
+; RUN: opt < %s -passes='loop-mssa(licm,loop-deletion),simplifycfg' -simplifycfg-require-and-preserve-domtree=1 -S | \
; RUN: not grep "br "
define i32 @main(i32 %argc) {
; LICM is adding stores before phi nodes. bad.
-; RUN: opt < %s -licm
+; RUN: opt < %s -passes=licm
define i1 @test(i1 %c) {
; <label>:0
; Test that hoisting is disabled for pointers of different types...
;
-; RUN: opt < %s -licm
+; RUN: opt < %s -passes=licm
define void @test(ptr %P) {
br label %Loop
-; This testcase tests for a problem where LICM hoists loads out of a loop
-; despite the fact that calls to unknown functions may modify what is being
+; This testcase tests for a problem where LICM hoists loads out of a loop
+; despite the fact that calls to unknown functions may modify what is being
; loaded from. Basically if the load gets hoisted, the subtract gets turned
; into a constant zero.
;
-; RUN: opt < %s -licm -gvn -instcombine -S | grep load
+; RUN: opt < %s -passes='loop-mssa(licm),gvn,instcombine' -S | grep load
@X = global i32 7 ; <ptr> [#uses=2]
-; RUN: opt < %s -licm | lli -jit-kind=mcjit -force-interpreter
+; RUN: opt < %s -passes=licm | lli -jit-kind=mcjit -force-interpreter
define i32 @main() {
entry:
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -passes=licm -disable-output
%struct.roadlet = type { ptr, ptr, [8 x ptr], [8 x ptr] }
%struct.vehicle = type { ptr, ptr, i32, i32, %union.._631., i32 }
%union.._631. = type { i32 }
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -passes=licm -disable-output
; PR908
; END.
-; RUN: opt < %s -licm -S | grep "store volatile"
+; RUN: opt < %s -passes=licm -S | grep "store volatile"
; PR1435
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-apple-darwin8"
-; RUN: opt < %s -licm -simple-loop-unswitch -disable-output
+; RUN: opt < %s -passes=licm,simple-loop-unswitch -disable-output
%struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] }
%struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, [4 x i32] }
; ModuleID = 'PR1657.bc'
-; Do not promote getelementptr because it may exposes load from a null pointer
-; and store from a null pointer which are covered by
+; Do not promote getelementptr because it may exposes load from a null pointer
+; and store from a null pointer which are covered by
; icmp eq ptr null, null condition.
-; RUN: opt < %s -licm -S | not grep promoted
+; RUN: opt < %s -passes=licm -S | not grep promoted
%struct.decision = type { i8, ptr }
define i32 @main() {
; Do not promote null value because it may be unsafe to do so.
-; RUN: opt < %s -licm -S | not grep promoted
+; RUN: opt < %s -passes=licm -S | not grep promoted
define i32 @f(i32 %foo, i32 %bar, i32 %com) {
entry:
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; Promote value if at least one use is safe
store i32 20, ptr %p
%tmp3.i = icmp eq ptr null, %q ; <i1> [#uses=1]
br i1 %tmp3.i, label %exit, label %cond.true
-
+
cond.true: ; preds = %loop.head
store i32 40, ptr %p
br label %loop.head
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -passes=licm -disable-output
; PR2346
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-f80:128:128"
target triple = "i686-pc-linux-gnu"
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
@a = external constant ptr
; Test for rdar://7452967
-; RUN: opt < %s -licm -disable-output
+; RUN: opt < %s -passes=licm -disable-output
define void @foo (ptr %v)
{
entry:
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; PR9630
@g_39 = external global i16, align 2
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; PR9634
@g_58 = common global i32 0, align 4
-; RUN: opt < %s -loop-rotate -licm -S | FileCheck %s
+; RUN: opt < %s -passes='loop-mssa(loop-rotate,licm)' -S | FileCheck %s
; PR9604
@g_3 = global i32 0, align 4
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
@A = common global [1024 x float] zeroinitializer, align 4
-; RUN: opt < %s -licm -loop-unroll -disable-output
+; RUN: opt < %s -passes='loop-mssa(licm),loop-unroll' -disable-output
; Test triggered an assertion in doFinalization() because loop unroll was deleting
; the inner loop which caused the loop to not get removed from the
; LoopToAliasSetMap.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm -mtriple aarch64-linux-gnu -S < %s | FileCheck %s
+; RUN: opt -passes=licm -mtriple aarch64-linux-gnu -S < %s | FileCheck %s
define i1 @func(ptr %0, i64 %1) {
; CHECK-LABEL: @func(
-; RUN: opt -licm -mtriple aarch64-linux-gnu -mattr=+sve -S < %s | FileCheck %s
+; RUN: opt -passes=licm -mtriple aarch64-linux-gnu -mattr=+sve -S < %s | FileCheck %s
define void @no_hoist_load1_nxv2i64(ptr %out, ptr %in8, i32 %n) {
; CHECK-LABEL: @no_hoist_load1_nxv2i64(
-; RUN: opt -licm -mtriple=amdgcn -S -o - %s | FileCheck %s
+; RUN: opt -passes=licm -mtriple=amdgcn -S -o - %s | FileCheck %s
; CHECK-LABEL: foo
; CHECK: ret
-; RUN: opt < %s -loop-deletion -licm -loop-idiom -disable-output
+; RUN: opt < %s -passes='loop-mssa(loop-deletion,licm,loop-idiom)' -disable-output
; Check no assertion when loop-idiom deletes the MemSet already analyzed by licm
define void @set_array() {
br i1 false, label %bb3.preheader.lr.ph, label %bb9
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
define void @f(i1 %c) {
; CHECK-LABEL: @f(
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
@b = external global i32, align 4
@fn3.i = external global i32, align 4
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
define void @f(i1 zeroext %p1) {
; CHECK-LABEL: @f(
-; RUN: opt < %s -loop-rotate -licm -simple-loop-unswitch -disable-output -verify-loop-info -verify-dom-info
+; RUN: opt < %s -passes='loop-mssa(loop-rotate,licm,simple-loop-unswitch)' -disable-output -verify-loop-info -verify-dom-info
define i32 @stringSearch_Clib(i32 %count) {
entry:
-; RUN: opt -S -licm -loop-unroll < %s
+; RUN: opt -S -passes='loop-mssa(licm),loop-unroll' < %s
;
; This test contains a carefully rotated set of three nested loops. The middle
; loop can be unrolled leaving one copy of the inner loop inside the outer
-; RUN: opt -licm < %s -S | FileCheck %s
+; RUN: opt -passes=licm < %s -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
define void @f_0(i1 %p) nounwind ssp {
-; RUN: opt < %s -licm | llvm-dis
+; RUN: opt < %s -passes=licm | llvm-dis
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
define void @testfunc(i32 %i) {
; Make sure we don't crash in LICM.
-; RUN: opt %s -licm -opt-bisect-limit=1
+; RUN: opt %s -passes=licm -opt-bisect-limit=1
define void @patatino() {
for.cond1:
-; RUN: opt -S -licm %s | FileCheck %s
+; RUN: opt -S -passes=licm %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
declare i32 @load(ptr %p) argmemonly readonly nounwind
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
define i32 @j() {
; CHECK-LABEL: @j(
-; RUN: opt < %s -S -licm | FileCheck %s
+; RUN: opt < %s -S -passes=licm | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
; This fixes PR22460
-; RUN: opt < %s -S -licm | FileCheck %s
+; RUN: opt < %s -S -passes=licm | FileCheck %s
; Check that we do not hoist convergent functions out of loop
; CHECK: define i32 @test
-; RUN: opt -licm -disable-output < %s
+; RUN: opt -passes=licm -disable-output < %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -disable-output < %s
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"
-; RUN: opt -licm < %s -S | FileCheck %s
+; RUN: opt -passes=licm < %s -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
define void @dgefa() nounwind ssp {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; This test case case is generated from the following C code with -fstrict-aliasing,
; and after passing through -inline -mem2reg -loop-rotate -instcombine
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -make-guards-explicit -licm < %s | FileCheck %s
; RUN: opt -S -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,make-guards-explicit,loop-mssa(licm)' < %s | FileCheck %s
declare void @llvm.experimental.guard(i1,...)
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; RUN: opt -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
; PR19835
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-; RUN: opt -licm < %s -S | FileCheck %s
+; RUN: opt -passes=licm < %s -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
define void @test1(i64 %n) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
define void @hoist(i1 %a) {
; CHECK-LABEL: @hoist(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: asserts
-; RUN: opt -licm -ipt-expensive-asserts=true < %s -S | FileCheck %s
+; RUN: opt -passes=licm -ipt-expensive-asserts=true < %s -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -ipt-expensive-asserts=true < %s -S | FileCheck %s
; Hoist guard and load.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm -use-dereferenceable-at-point-semantics=0 < %s | FileCheck %s
-; RUN: opt -S -licm -use-dereferenceable-at-point-semantics=1 < %s | FileCheck %s
+; RUN: opt -S -passes=licm -use-dereferenceable-at-point-semantics=0 < %s | FileCheck %s
+; RUN: opt -S -passes=licm -use-dereferenceable-at-point-semantics=1 < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(loop-simplifycfg,licm)' -S < %s | FileCheck %s
-; RUN: opt -S -licm -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -passes=licm -verify-memoryssa < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt < %s -strip-debug -licm -S | FileCheck %s
-; RUN: opt < %s -licm -verify-memoryssa -S | FileCheck %s
+; RUN: opt < %s -strip-debug -passes=licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -verify-memoryssa -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -passes=licm -verify-memoryssa < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(loop-simplifycfg,licm)' -verify-memoryssa -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-; RUN: opt -licm -verify-memoryssa -S < %s | FileCheck %s
+; RUN: opt -passes=licm -verify-memoryssa -S < %s | FileCheck %s
; Function Attrs: noinline norecurse nounwind readnone ssp uwtable
define zeroext i1 @invariant_denom(double %v) #0 {
; REQUIRES: asserts
-; RUN: opt < %s -licm -verify-memoryssa -disable-basic-aa -stats -S 2>&1 | grep "1 licm"
+; RUN: opt < %s -passes=licm -verify-memoryssa -disable-basic-aa -stats -S 2>&1 | grep "1 licm"
@"\01L_OBJC_METH_VAR_NAME_" = internal global [4 x i8] c"foo\00", section "__TEXT,__objc_methname,cstring_literals", align 1
@"\01L_OBJC_SELECTOR_REFERENCES_" = internal global ptr @"\01L_OBJC_METH_VAR_NAME_", section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
;; C reproducer:
;; void f(int *ptr, int n) {
; REQUIRES: asserts
-; RUN: opt -S -licm -ipt-expensive-asserts=true < %s | FileCheck %s
+; RUN: opt -S -passes=licm -ipt-expensive-asserts=true < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(licm)' -ipt-expensive-asserts=true -S %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
-; RUN: opt -S -licm -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -passes=licm -verify-memoryssa < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -S -licm < %s | FileCheck %s -check-prefixes=CHECK,CHECK-DISABLED
-; RUN: opt -S -licm -licm-control-flow-hoisting=1 < %s | FileCheck %s -check-prefixes=CHECK,CHECK-ENABLED
-; RUN: opt -S -licm -licm-control-flow-hoisting=0 < %s | FileCheck %s -check-prefixes=CHECK,CHECK-DISABLED
+; RUN: opt -S -passes=licm < %s | FileCheck %s -check-prefixes=CHECK,CHECK-DISABLED
+; RUN: opt -S -passes=licm -licm-control-flow-hoisting=1 < %s | FileCheck %s -check-prefixes=CHECK,CHECK-ENABLED
+; RUN: opt -S -passes=licm -licm-control-flow-hoisting=0 < %s | FileCheck %s -check-prefixes=CHECK,CHECK-DISABLED
; RUN: opt -passes='require<opt-remark-emit>,loop-mssa(licm)' -S < %s | FileCheck %s -check-prefixes=CHECK,CHECK-DISABLED
; RUN: opt -passes='require<opt-remark-emit>,loop-mssa(licm)' -licm-control-flow-hoisting=1 -verify-memoryssa -S < %s | FileCheck %s -check-prefixes=CHECK,CHECK-ENABLED
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
-; RUN: opt -S -licm -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -passes=licm -verify-memoryssa < %s | FileCheck %s
target datalayout = "E-m:e-p:32:32-i8:8:8-i16:16:16-i64:32:32-f64:32:32-v64:32:32-v128:32:32-a0:0:32-n32"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
; Make sure we don't hoist the unsafe division to some executable block.
-; RUN: opt -S < %s -licm | FileCheck %s
+; RUN: opt -S < %s -passes=licm | FileCheck %s
declare void @llvm.sideeffect()
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm < %s -S | FileCheck %s
+; RUN: opt -passes=licm < %s -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
define void @test1(i1 %cond, ptr %ptr) {
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s| FileCheck %s
;
; Manually validate LCSSA form is preserved even after SSAUpdater is used to
-; RUN: opt -S -verify-memoryssa -loop-sink < %s | FileCheck %s
+; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s
; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
-; RUN: opt -S -verify-memoryssa -loop-sink < %s | FileCheck %s
+; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s
; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s
; CHECK: pr39570
-; RUN: opt -S -verify-memoryssa -loop-sink < %s | FileCheck %s
+; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s
; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s
; The load instruction should not be sunk into following loop.
-; RUN: opt -S -verify-memoryssa -loop-sink < %s | FileCheck %s
+; RUN: opt -S -verify-memoryssa -passes=loop-sink < %s | FileCheck %s
; RUN: opt -S -verify-memoryssa -aa-pipeline=basic-aa -passes=loop-sink < %s | FileCheck %s
@g = global i32 0, align 4
; Test that LICM works when there is not a loop-preheader
-; RUN: opt < %s -licm | llvm-dis
+; RUN: opt < %s -passes=licm | llvm-dis
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
define void @testfunc(i32 %i.s, i1 %ifcond) {
-; RUN: opt < %s -licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
-; RUN: opt < %s -licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
-; RUN: opt < %s -licm -pass-remarks=licm -o /dev/null 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=licm -pass-remarks=licm -o /dev/null 2>&1 | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks=licm 2>&1 | FileCheck %s
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
-; RUN: opt %s -S -loop-unroll -licm | FileCheck %s
+; RUN: opt %s -S -passes='loop-unroll,loop-mssa(licm)' | FileCheck %s
; Check that we can deal with loops where a parent loop gets deleted before it
; is visited by LICM.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm %s | FileCheck %s --check-prefix=NO_ASSUME
-; RUN: opt -S -licm --enable-knowledge-retention %s | FileCheck %s --check-prefix=USE_ASSUME
+; RUN: opt -S -passes=licm %s | FileCheck %s --check-prefix=NO_ASSUME
+; RUN: opt -S -passes=licm --enable-knowledge-retention %s | FileCheck %s --check-prefix=USE_ASSUME
; ModuleID = '../pr23608.ll'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
-@v = common global i32 zeroinitializer, align 4
+@v = common global i32 zeroinitializer, align 4
; Make sure the store to v is not sunk past the memset
; CHECK-LABEL: @main
define i32 @main(i1 %k) {
entry:
br label %for.body
-
+
for.body:
store i32 1, ptr @v, align 4
tail call void @llvm.memset.p0.i32(ptr align 4 @v, i8 0, i32 4, i1 false)
br label %for.latch
-
+
for.latch:
br i1 %k, label %for.body, label %end
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
entry:
%p1 = getelementptr i8, ptr %p, i32 1
br label %for.body
-
+
for.body:
store i8 1, ptr %p, align 1
store i8 2, ptr %p1, align 1
call void @llvm.memset.p0.i32(ptr %p, i8 255, i32 4, i1 false)
br label %for.latch
-
+
for.latch:
br i1 %k, label %for.body, label %end
-; RUN: opt -S -licm -simple-loop-unswitch -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm,simple-loop-unswitch,licm < %s | FileCheck %s
declare void @llvm.experimental.guard(i1, ...)
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:1"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -S -licm -o - %s | FileCheck %s
+; RUN: opt -S -passes=licm -o - %s | FileCheck %s
;
; Be sure that we don't hoist loads incorrectly if a loop has conditional UB.
; See PR36228.
-; RUN: opt -S -mcpu=z13 -licm -licm-control-flow-hoisting -verify-memoryssa < %s | FileCheck %s
+; RUN: opt -S -mcpu=z13 -passes=licm -licm-control-flow-hoisting -verify-memoryssa < %s | FileCheck %s
target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
target triple = "s390x-ibm-linux"
-; RUN: opt %s -S -licm | FileCheck %s
+; RUN: opt %s -S -passes=licm | FileCheck %s
define i16 @main(i1 %a_b_mayalias, ptr %a, ptr %b) {
; CHECK: scalar.body:
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; Make sure that a store of a pointer to itself is handled correctly.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
@c = global i16 0, align 2
-; RUN: opt < %s -S -licm | FileCheck %s
+; RUN: opt < %s -S -passes=licm | FileCheck %s
; Check that the LICM pass does not operate on a loop which has the
; llvm.licm.disable metadata.
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
declare void @use_nothrow(i64 %a) nounwind
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
%class.LiveThread = type { i64, ptr }
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s --check-prefixes=CHECK,MT
-; RUN: opt -S -licm -licm-force-thread-model-single < %s | FileCheck %s --check-prefixes=CHECK,ST
+; RUN: opt -S -passes=licm < %s | FileCheck %s --check-prefixes=CHECK,MT
+; RUN: opt -S -passes=licm -licm-force-thread-model-single < %s | FileCheck %s --check-prefixes=CHECK,ST
@g = external global i32
@c = external constant i32
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -licm -S < %s | FileCheck %s
+; RUN: opt -passes=licm -S < %s | FileCheck %s
; RUN: opt -passes='loop-mssa(licm)' -S %s | FileCheck %s
; If we can prove a local is thread local, we can insert stores during
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; FIXME: The %val.ptr load might alias the %pos.ptr load/stores, but it's still
; fine to promote the load as long as the store is retained.
-; RUN: opt -S -licm %s | FileCheck %s
+; RUN: opt -S -passes=licm %s | FileCheck %s
; Volatile register shouldn't be hoisted ourside loops.
define i32 @test_read() {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
; Make sure we don't hoist a conditionally-executed store out of the loop;
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; LICM is trying to merge the two `store` in block %14 and %17, but given their
; locations disagree, it sets a line zero location instead instead of picking a
; volatile int a;
; extern int g;
; int g;
-; void f1() {
-; while (a) {
+; void f1() {
+; while (a) {
; g = 0;
; if (a)
; g = 0;
-; }
+; }
; }
; CHECK: bb22:
-; CHECK-NEXT: store i32 0, ptr getelementptr inbounds ([2 x i32], ptr @g_390, i64 0, i64 1), align 4, !dbg [[storeLocation:![0-9]+]]
+; CHECK-NEXT: store i32 0, ptr getelementptr inbounds ([2 x i32], ptr @g_390, i64 0, i64 1), align 4, !dbg [[storeLocation:![0-9]+]]
; CHECK: [[storeLocation]] = !DILocation(line: 0
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: aarch64-registered-target
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
target triple = "aarch64--linux-gnueabi"
-; RUN: opt < %s -licm -S | FileCheck %s
+; RUN: opt < %s -passes=licm -S | FileCheck %s
; Test moved from sinking.ll, as it tests sinking of a store who alone touches
; a memory location in a loop.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -debugify -licm -S | FileCheck %s
+; RUN: opt < %s -passes='debugify,function(loop-mssa(licm))' -S | FileCheck %s
%Ty = type { i32, i32 }
@X2 = external global %Ty
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -licm -S -verify-memoryssa | FileCheck %s
+; RUN: opt < %s -passes=licm -S -verify-memoryssa | FileCheck %s
declare i32 @strlen(ptr) readonly nounwind willreturn
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
; RUN: opt -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
; UDiv is safe to speculate if the denominator is known non-zero.
-; RUN: opt -S -inferattrs -licm < %s | FileCheck %s
+; RUN: opt -S -passes='inferattrs,function(loop-mssa(licm))' < %s | FileCheck %s
define void @test(ptr noalias %loc, ptr noalias %a) {
; CHECK-LABEL: @test
; loop.
;
; RUN: opt -S -aa-pipeline=basic-aa -passes='require<opt-remark-emit>,loop-mssa(licm)' < %s | FileCheck %s
-; RUN: opt -S -licm < %s | FileCheck %s
+; RUN: opt -S -passes=licm < %s | FileCheck %s
define i32 @test(ptr %a, i64 %n.0, i64 %n.0.0, i64 %n.0.0.0, i64 %n.0.0.0.0) nounwind uwtable readonly {
; CHECK-LABEL: define i32 @test