-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
%struct.PerlInterpreter = type { i8 }
@PL_sv_count = external global i32 ; <i32*> [#uses=2]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct.INT2 = type { i32, i32 }
@blkshifts = external global %struct.INT2* ; <%struct.INT2**> [#uses=2]
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
%struct.s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float }
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
%struct.TypHeader = type { i32, %struct.TypHeader**, [3 x i8], i8 }
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
%struct.ggBRDF = type { i32 (...)** }
%struct.ggBox3 = type { %struct.ggPoint3, %struct.ggPoint3 }
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
@last = external global [65 x i32*]
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
@bsLive = external global i32 ; <i32*> [#uses=2]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct..0anon = type { i32 }
%struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
%"struct.Block::$_16" = type { i32 }
%struct.Exp = type { %struct.Exp_*, i32, i32, i32, %struct.Exp*, %struct.Exp*, %"struct.Exp::$_10", %"struct.Block::$_16", %"struct.Exp::$_12" }
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct.anon = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* }
@debug = external constant i32 ; <i32*> [#uses=0]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
@img_width = external global i16 ; <i16*> [#uses=2]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; PR1996
%struct.anon = type { i32, i8, i8, i8, i8 }
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; PR2503
@g_3 = external global i8 ; <i8*> [#uses=2]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
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 = "i386-apple-darwin9.5"
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
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 = "i386-apple-darwin7"
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
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 = "i386-apple-darwin7"
@sort_value = external global [256 x i32], align 32 ; <[256 x i32]*> [#uses=2]
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
; Cached results must be added to and verified against the visited sets.
; PR3217
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
; PR3358
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 < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
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 = "i386-apple-darwin7"
-; RUN: opt < %s -gvn | llvm-dis
+; RUN: opt < %s -passes=gvn | llvm-dis
; PR4256
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:32:32"
target triple = "i386-pc-linux-gnu"
; Test to make sure malloc's bitcast does not block detection of a store
; to aliased memory; GVN should not optimize away the load in this program.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i64 @test() {
%1 = tail call i8* @malloc(i64 mul (i64 4, i64 ptrtoint (i64* getelementptr (i64, i64* null, i64 1) to i64))) ; <i8*> [#uses=2]
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; CHECK-NOT: load
; CHECK-NOT: phi
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
declare i32 @foo(i32) readnone
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
;
%0 = type { i64, i1 }
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct.__fundamental_type_info_pseudo = type { %struct.__type_info_pseudo }
%struct.__type_info_pseudo = type { i8*, i8* }
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
declare void @llvm.masked.scatter.v2i32.v2p0i32(<2 x i32> , <2 x i32*> , i32 , <2 x i1> )
declare <2 x i32> @llvm.masked.gather.v2i32.v2p0i32(<2 x i32*>, i32, <2 x i1>, <2 x i32>)
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
declare void @llvm.masked.scatter.v2i32.v2p0i32(<2 x i32> , <2 x i32*> , i32 , <2 x i1> )
declare <2 x i32> @llvm.masked.gather.v2i32.v2p0i32(<2 x i32*>, i32, <2 x i1>, <2 x i32>)
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %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"
target triple = "x86_64-apple-macosx10.7.0"
; This test checks if debug loc is propagated to load/store created by GVN/Instcombine.
-; RUN: opt < %s -gvn -S | FileCheck %s --check-prefixes=ALL,GVN
+; RUN: opt < %s -passes=gvn -S | FileCheck %s --check-prefixes=ALL,GVN
; RUN: opt < %s -gvn -instcombine -S | FileCheck %s --check-prefixes=ALL,INSTCOMBINE
; struct node {
; This test checks if debug loc is propagated to load/store created by GVN/Instcombine.
-; RUN: opt < %s -gvn -S | FileCheck %s --check-prefixes=ALL
+; RUN: opt < %s -passes=gvn -S | FileCheck %s --check-prefixes=ALL
; RUN: opt < %s -gvn -instcombine -S | FileCheck %s --check-prefixes=ALL
; struct node {
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %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"
target triple = "x86_64-apple-macosx10.7.0"
; Test if the !invariant.load metadata is maintained by GVN.
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(i32* nocapture %p, i8* nocapture %q) {
; CHECK-LABEL: test1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Check that PRE-LOAD across backedge does not
; result in invalid dominator tree.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; RUN: opt < %s -passes="gvn<load-pre>" -S | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4"
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@a = common global [100 x i64] zeroinitializer, align 16
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; This testcase tests insertion of no-cost phis. That is,
; when the value is already available in every predecessor,
; and we just need to insert a phi node to merge the available values.
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
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 = "i386-apple-darwin7"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 @main(i32* %p, i32 %x, i32 %y) {
block1:
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 addrspace(1)* @addrspacecast(i32* %ptr) {
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct.A = type { i32 (...)** }
@_ZTV1A = available_externally unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast (i8** @_ZTI1A to i8*), i8* bitcast (i32 (%struct.A*)* @_ZN1A3fooEv to i8*), i8* bitcast (i32 (%struct.A*)* @_ZN1A3barEv to i8*)], align 8
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
declare void @llvm.assume(i1)
declare void @use(i1)
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; ModuleID = 'test3.ll'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 @main() {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; PR2213
define i32* @f(i8* %x) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; This test checks that we don't hang trying to split a critical edge in loadpre
; when the control flow uses a callbr instruction.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; This test checks that we don't hang trying to split a critical edge in scalar
; PRE when the control flow uses a callbr instruction.
; Two occurrences of strlen should be zapped.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
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 = "i386-apple-darwin9"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; Should delete the second call to strlen even though the intervening strchr call exists.
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"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
declare void @use(i32, i32)
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
@y = external global i32
@z = external global i32
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %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-S128"
%"class.llvm::SmallVector" = type { %"class.llvm::SmallVectorImpl", [1 x %"union.llvm::SmallVectorBase::U"] }
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
@a = external global i32 ; <i32*> [#uses=7]
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Check that the redundant load from %if.then is removed.
; Also, check that the debug location associated to load %0 still refers to
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; CHECK: {{^}}for.body:
; CHECK-NEXT: [[VREG1:%[^ ]+]] = phi{{.*}}[[VREG2:%[^ ]+]],{{.*}}%.sink,
; CHECK-NOT: !dbg
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @f1(i32 %x) {
; CHECK-LABEL: define i32 @f1(
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
declare void @use(i1)
; expressions. As a result, the compilation never fisished.
; This test checks that we are folding constant expression
; PR 28418
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
%2 = type { i32, i32, i32, i32, i32 }
define i32 @_Z16vector3util_mainv(i32 %x, i32 %y) {
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define double @test1(double %x, double %y) {
; CHECK: @test1(double %x, double %y)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i1 @f(i1 %a) {
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %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-msvc"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
declare void @func()
declare i32 @"personality_function"()
-; RUN: opt -S < %s -gvn | FileCheck %s
+; RUN: opt -S < %s -passes=gvn | FileCheck %s
declare void @llvm.sideeffect()
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%struct.A = type { i32 (...)** }
@_ZTV1A = available_externally unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast (i8** @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A3fooEv to i8*)], align 8
; Test to make sure llvm.invariant.start calls are not treated as clobbers.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
declare {}* @llvm.invariant.start.p0i8(i64, i8* nocapture) nounwind readonly
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
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 = "i386-apple-darwin7"
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Check that an unreachable predecessor to a PHI node doesn't cause a crash.
; PR21625.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; load may be speculated, address is not null using context search.
; There is a critical edge.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
@file_mask = external global [8 x i64], align 32
define fastcc void @test() {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Check that in both cases the second load is recognized as redundant
; and is removed.
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(i32* %p, i32* %q) {
; CHECK-LABEL: @test1(i32* %p, i32* %q)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4:5"
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4:5"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
%t = type { i32 }
declare void @test1f(i8*)
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %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-f128:128:128-n8:16:32:64"
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %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-f128:128:128-n8:16:32:64"
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(i32 %x, i32 %y) {
; CHECK: @test1(i32 %x, i32 %y)
-; RUN: opt -gvn -S -o - < %s | FileCheck %s
+; RUN: opt -passes=gvn -S -o - < %s | FileCheck %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-S128"
target triple = "x86_64-unknown-linux-gnu"
-;RUN: opt -gvn -S < %s | FileCheck %s
+;RUN: opt -passes=gvn -S < %s | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n8:16:32-S64"
target triple = "thumbv7--linux-gnueabi"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
@Data = common local_unnamed_addr global [32 x i32] zeroinitializer, align 4
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i1 @foo() {
; CHECK-LABEL: @foo(
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; C source:
;
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; CHECK-LABEL: func_fast
; CHECK: fadd fast double
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(i32* %p) {
; CHECK-LABEL: @test1(i32* %p)
-; RUN: opt -gvn -S -o - < %s | FileCheck %s
+; RUN: opt -passes=gvn -S -o - < %s | FileCheck %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"
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; GVN should eliminate the fully redundant %9 GEP which
; allows DEAD to be removed. This is PR3198.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; XFAIL: *
; FIXME: This should be promotable, but memdep/gvn don't track values
; path/edge sensitively enough.
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 @main(i32** %p, i32 %x, i32 %y) {
block1:
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S -o - < %s | FileCheck %s
+; RUN: opt -passes=gvn -S -o - < %s | FileCheck %s
define double @code(double* %a1) {
; CHECK-LABEL: @code(
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
define i32 @test1(i8* %p, i8* %q) {
; CHECK-LABEL: @test1(i8* %p, i8* %q)
-; RUN: opt < %s -gvn -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -S | FileCheck %s
; loop.then is not reachable from loop, so we should be able to deduce that the
; store through %phi2 cannot alias %ptr1.
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
%struct.t = type { i32* }
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn -S < %s | FileCheck %s
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
; Make sure we don't delete the second vp.gather.
define <vscale x 8 x i32> @foo(<vscale x 8 x ptr> %p, <vscale x 8 x i32> %x, <vscale x 8 x i1> %mask, i32 %vl) {
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Check that the call and fcmp are hoisted.
; CHECK-LABEL: define void @fun(
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
; Check that convergent calls are not hoisted.
;
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Check that the debug info is dropped as per the debug info update guide
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %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 -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
; CHECK: store
; CHECK-NOT: store
-; RUN: opt -S -gvn-hoist -newgvn < %s | FileCheck %s
+; RUN: opt -S -passes='function(gvn-hoist),function(newgvn)' < %s | FileCheck %s
; Check that store hoisting works: there should be only one store left.
; CHECK-LABEL: @getopt
-; RUN: opt -gvn-hoist -newgvn -S < %s | FileCheck %s
+; RUN: opt -passes='function(gvn-hoist),function(newgvn)' -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 -gvn-hoist -newgvn -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes='function(gvn-hoist),function(newgvn),function(gvn-hoist)' -S < %s | FileCheck %s
; Test to demonstrate that newgvn creates opportunities for
; more gvn-hoist when sibling branches contain identical expressions.
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %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"
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Hoisted inlinable calls need to have accurate scope information, but we're
; allowed to erase the line information.
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %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"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -gvn-hoist -newgvn -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes='function(gvn-hoist),function(newgvn),function(gvn-hoist)' -S < %s | FileCheck %s
; Check that recursive GEPs are hoisted. Since hoisting creates
; fully redundant instructions, newgvn is run to remove them which then
-; RUN: opt < %s -gvn-hoist -S | FileCheck %s
+; RUN: opt < %s -passes=gvn-hoist -S | FileCheck %s
; This test is meant to make sure that MemorySSAUpdater works correctly
; in non-trivial cases.
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
; Check that urem is not hoisted.
; CHECK-LABEL: @main
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
%struct.__jmp_buf_tag = type { [8 x i64], i32 }
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -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 -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Checking gvn-hoist in case of infinite loops and irreducible control flow.
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Checking gvn-hoist in case of indirect branches.
-; RUN: opt -S < %s -gvn-hoist | FileCheck %s
+; RUN: opt -S < %s -passes=gvn-hoist | FileCheck %s
declare void @llvm.sideeffect()
; Test load hoist
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc_linux"
; Tests to make sure that loads and stores in a diamond get merged
; Loads are hoisted into the header. Stores sunks into the footer.
-; RUN: opt -gvn-hoist -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-hoist -S < %s | FileCheck %s
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
%struct.node = type { i64, %struct.node*, %struct.node*, %struct.node*, i64, %struct.arc*, i64, i64, i64 }
-; RUN: opt -gvn-hoist %s -S -o - | FileCheck %s
+; RUN: opt -passes=gvn-hoist %s -S -o - | FileCheck %s
; CHECK: store
; CHECK-NOT: store
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %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 -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Check that the stores are not hoisted: it is invalid to hoist stores if they
; are not executed on all paths. In this testcase, there are paths in the loop
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Check that the stores are not hoisted: it is invalid to hoist stores if they
; are not executed on all paths. In this testcase, there are paths in the loop
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; Make sure the two stores @B do not get hoisted past the load @B.
-; RUN: opt -S -gvn-hoist < %s
+; RUN: opt -S -passes=gvn-hoist < %s
define void @_Z3fn2v() #0 {
entry:
-; RUN: opt -S -gvn-hoist < %s | FileCheck %s
+; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s
; CHECK-LABEL: build_tree
; CHECK: load
; CHECK: load
-; RUN: opt < %s -gvn-hoist -S | FileCheck %s
+; RUN: opt < %s -passes=gvn-hoist -S | FileCheck %s
@g = external constant i8*
-; RUN: opt < %s -gvn-hoist -S | FileCheck %s
+; RUN: opt < %s -passes=gvn-hoist -S | FileCheck %s
define void @func() {
; CHECK-LABEL: @func()
-; RUN: opt < %s -gvn-hoist -S | FileCheck %s
+; RUN: opt < %s -passes=gvn-hoist -S | FileCheck %s
; gvn-hoist shouldn't crash in this case.
; CHECK-LABEL: @func(i1 %b)
-; RUN: opt < %s -S -gvn-sink | FileCheck %s
+; RUN: opt < %s -S -passes=gvn-sink | FileCheck %s
; Because %tmp17 has flipped operands to its equivalents %tmp14 and %tmp7, we
; can't sink the zext as we'd need a shuffling PHI in between.
-; RUN: opt -S < %s -gvn-sink | FileCheck %s
+; RUN: opt -S < %s -passes=gvn-sink | FileCheck %s
; CHECK-LABEL: sink
; CHECK-NOT: fneg
-; RUN: opt -S < %s -gvn-sink | FileCheck %s
+; RUN: opt -S < %s -passes=gvn-sink | FileCheck %s
declare void @llvm.sideeffect()
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -gvn-sink -S < %s | FileCheck %s
+; RUN: opt -passes=gvn-sink -S < %s | FileCheck %s
; This would assert/crash because the calls have different numbers of operands:
; https://bugs.llvm.org/show_bug.cgi?id=42346
-; RUN: opt < %s -gvn-sink -S | FileCheck %s
+; RUN: opt < %s -passes=gvn-sink -S | FileCheck %s
; Check that nonnull metadata for non-dominating loads is not propagated.
; CHECK-LABEL: @test1(
-; RUN: opt -gvn-sink -S < %s | FileCheck %s
; RUN: opt -passes=gvn-sink -S < %s | FileCheck %s
%struct = type {i32, i32}
-; RUN: opt < %s -globalopt
+; RUN: opt < %s -passes=globalopt
@V = global float 1.200000e+01 ; <float*> [#uses=1]
@G = internal global i32* null ; <i32**> [#uses=2]
-; RUN: opt < %s -globalopt
+; RUN: opt < %s -passes=globalopt
@g = global i32 0
-; RUN: opt < %s -globalopt
+; RUN: opt < %s -passes=globalopt
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"
%struct.s_annealing_sched = type { i32, float, float, float, float }
-; RUN: opt -globalopt < %s
+; RUN: opt -passes=globalopt < %s
; Ensure we don't ICE by trying to optimize a scalable vector load of a global
; variable.
-; RUN: opt < %s -instcombine -globalopt -S | FileCheck %s
+; RUN: opt < %s -passes='function(instcombine),globalopt' -S | FileCheck %s
; CHECK: internal fastcc float @foo
define internal float @foo() {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
target datalayout = "p1:32:32"
-; RUN: opt -globalopt -instcombine %s -S -o - | FileCheck %s
+; RUN: opt -passes=globalopt,instcombine %s -S -o - | FileCheck %s
; Static constructor should have been optimized out
; CHECK: i32 @main
; Checks for few bitcasted call evaluation errors
; REQUIRES: asserts
-; RUN: opt -globalopt -instcombine -S -debug-only=evaluator %s -o %t 2>&1 | FileCheck %s
+; RUN: opt -passes=globalopt,instcombine -S -debug-only=evaluator %s -o %t 2>&1 | FileCheck %s
; CHECK: Failed to fold bitcast call expr
; CHECK: Can not convert function argument
; We evaluate call to function _ZL3bazP3Foo casting its parameter and check that evaluated value (nullptr)
; is handled correctly
-; RUN: opt -globalopt -instcombine -S %s -o - | FileCheck %s
+; RUN: opt -passes=globalopt,instcombine -S %s -o - | FileCheck %s
; CHECK: @gBar = local_unnamed_addr global %struct.Bar { i32 2 }
; CHECK-NEXT: @_s = local_unnamed_addr global %struct.S { i32 1 }, align 4
; Check if we can evaluate a bitcasted call to a function which is constant folded.
; Evaluator folds call to fmodf, replacing it with constant value in case both operands
; are known at compile time.
-; RUN: opt -globalopt -instcombine %s -S -o - | FileCheck %s
+; RUN: opt -passes=globalopt,instcombine %s -S -o - | FileCheck %s
; CHECK: @_q = dso_local local_unnamed_addr global %struct.Q { i32 1066527622 }
; CHECK: define dso_local i32 @main
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Make sure that the load from uniform value @g1 succeeds during evaluation.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
@g = internal global [8 x i8] undef
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt -opaque-pointers < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt -opaque-pointers < %s | FileCheck %s
; Global SRA should not be performed here (or at least not naively), as
; offset 4 is accessed as both i32 and i64.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Make sure we don't recursively SRA if there are aggregate load/stores with
; the same type as the global.
-; RUN: opt < %s -S -globalopt -instcombine | FileCheck %s
+; RUN: opt < %s -S -passes=globalopt,instcombine | FileCheck %s
;; check that global opt turns integers that only hold 0 or 1 into bools.
@G = internal addrspace(1) global i32 0
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt -opaque-pointers < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt -opaque-pointers < %s | FileCheck %s
@g1 = internal global ptr null
@g2 = internal global ptr null
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Check that we don't crash on vector GEP indices.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
%type = type { { i8** } }
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Check that aggregate stores work correctly.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; The store here writes into the padding after [5 x i8].
; Make sure we don't crash.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
@b = internal global ptr null
@c = internal global [2 x ptr] zeroinitializer
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; In this case an instruction queued for recursive deletion gets RAUWd with
; a constant in the meantime. Make sure this does not cause an assertion
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt -opaque-pointers < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt -opaque-pointers < %s | FileCheck %s
; Make sure we don't try to convert to select if the load/stores don't match
; the global type.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
@g = internal global [4 x i8] undef
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; The global is stored once through a trivial GEP instruction (rather than
; GEP constant expression) here. We should still be able to optimize it.
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; Gracefully handle undef global_ctors/global_dtors
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -globalopt < %s | FileCheck %s
+; RUN: opt -S -passes=globalopt < %s | FileCheck %s
@m64 = internal global <1 x i64> zeroinitializer
-; RUN: opt -S -globalsplit %s | FileCheck %s
; RUN: opt -S -passes=globalsplit %s | FileCheck %s
target datalayout = "e-p:64:64"
-; RUN: opt -S -globalsplit %s | FileCheck %s
+; RUN: opt -S -passes=globalsplit %s | FileCheck %s
target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt -S -globalsplit %s | FileCheck %s
+; RUN: opt -S -passes=globalsplit %s | FileCheck %s
target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"
-; RUN: opt < %s -instcombine -mem2reg -S | \
+; RUN: opt < %s -passes='function(instcombine),function(mem2reg)' -S | \
; RUN: not grep "i32 1"
; When propagating the load through the select, make sure that the load is
-; RUN: opt < %s -instcombine -mem2reg -S | grep "%A = alloca"
-; RUN: opt < %s -instcombine -mem2reg -S | \
+; RUN: opt < %s -passes='function(instcombine),function(mem2reg)' -S | grep "%A = alloca"
+; RUN: opt < %s -passes='function(instcombine),function(mem2reg)' -S | \
; RUN: not grep "%B = alloca"
; END.
-; RUN: opt < %s -mem2reg -instcombine -S | grep "ret i32 1" | count 8
+; RUN: opt < %s -passes=mem2reg,instcombine -S | grep "ret i32 1" | count 8
define i32 @test1() {
entry:
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck --check-prefix=IC %s
-; RUN: opt < %s -instcombine -sroa -S | FileCheck --check-prefix=IC_SROA %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck --check-prefix=IC %s
+; RUN: opt < %s -passes=instcombine,sroa -S | FileCheck --check-prefix=IC_SROA %s
; rdar://6417724
; Instcombine shouldn't do anything to this function that prevents promoting the allocas inside it.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -instcombine -dce < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine,dce < %s | FileCheck %s
target triple = "aarch64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
target datalayout = "n32:64"
; RUN: opt < %s -passes=instcombine -S | grep "ret i32 %A"
-; RUN: opt < %s -dce -S | not grep call.*llvm
+; RUN: opt < %s -passes=dce -S | not grep call.*llvm
define i32 @test(i32 %A) {
%X = or i1 false, false
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S -mtriple "i386-pc-linux" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "i386-pc-win32" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "i386-pc-mingw32" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-mingw32" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "sparc-sun-solaris" | FileCheck %s
-; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-win32" -enable-debugify 2>&1 | FileCheck --check-prefix=DBG-VALID %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-linux" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-win32" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-mingw32" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "x86_64-pc-mingw32" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "sparc-sun-solaris" | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S -mtriple "x86_64-pc-win32" -enable-debugify 2>&1 | FileCheck --check-prefix=DBG-VALID %s
declare double @floor(double)
declare double @ceil(double)
; This run line verifies that we get the expected constant fold.
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i32 @foo(i32 %arg) #0 {
; CHECK-LABEL: @foo(
; - PhaseOrdering/fast-reassociate-gvn.ll
; - Reassociate/fast-basictest.ll
;
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
; With reassociation, constant folding can eliminate the 12 and -12 constants.
; When optimising for size, we don't want to rewrite fputs to fwrite
; because it requires more arguments and thus extra MOVs are required.
;
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
; RUN: opt < %s -passes='require<profile-summary>,function(instcombine)' -pgso -S | FileCheck %s -check-prefix=PGSO
; RUN: opt < %s -instcombine -pgso=false -S | FileCheck %s -check-prefix=NPGSO
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -instcombine -S %s | FileCheck %s
+; RUN: opt -passes=instcombine -S %s | FileCheck %s
define i8 @foo(<vscale x 1 x i8> %x, i64 %idx) {
; CHECK-LABEL: @foo(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i32 @t0(i64 %x) {
; CHECK-LABEL: @t0(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i64 @t0(i64 %x) {
; CHECK-LABEL: @t0(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -instcombine < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine < %s | FileCheck %s
declare void @use(i8)
declare void @use.i1(i1)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
; icmp u/s (a ^ signmask), (b ^ signmask) --> icmp s/u a, b
-; RUN: opt < %s -disable-output -instcombine -verify-dom-info
+; RUN: opt < %s -disable-output -passes=instcombine -verify-dom-info
; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck --check-prefixes=CHECK-POSTDOM %s
; Demonstrate that Predicate Canonicalization (InstCombine) does not invalidate PostDomTree
-; RUN: opt -instcombine -S < %s | FileCheck %s
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
;
; void func(long n, double A[static const restrict n]) {
; for (int i = 0; i < n; i+=1)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -instcombine -S < %s | FileCheck %s
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
; Check that load to load forwarding works with non aliasing store inbetween.
define i32 @test_load_store_load_combine(ptr, ptr) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -instcombine -S < %s | FileCheck %s
; RUN: opt -passes=instcombine -S < %s | FileCheck %s
target datalayout = "e-m:e-p:64:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1"
-; RUN: opt -instcombine -S < %s | FileCheck %s
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
; CHECK-LABEL: @test_load_combine_aa(
; CHECK: %[[V:.*]] = load i32, ptr %0
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define dso_local i32 @_Z6answeri(i32 %0) {
; CHECK-LABEL: @_Z6answeri(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
@.str = private unnamed_addr constant [27 x i8] c"abcdefghijklmnopqrstuvwxyz\00", align 1
@.str.1 = private unnamed_addr constant [2 x i8] c"\0D\0A", align 1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -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 -instcombine -S < %s | FileCheck %s
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
; RUN: opt -debugify-each -instcombine -S < %s | FileCheck %s
; These are both direct calls, but make sure instcombine leaves the casts
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -instcombine -opaque-pointers < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -opaque-pointers < %s | FileCheck %s
define ptr @bitcast_opaque_to_opaque(ptr %a) {
; CHECK-LABEL: @bitcast_opaque_to_opaque(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; Test for (x & y) + ~(x | y) -> ~(x ^ y)
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
; (x & y) + ~(x | y)
define i32 @src(i32 %0, i32 %1) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i64 @test_ptrauth_nop(ptr %p) {
; CHECK-LABEL: @test_ptrauth_nop(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
;
; Saturating addition.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i32 @foo(i32 %x, i32 %y) {
; CHECK-LABEL: @foo(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -instcombine -S < %s | FileCheck %s
; RUN: opt -passes=instcombine -S < %s | FileCheck %s
declare void @use(i32 %x)
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -instcombine-max-iterations=1 -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -instcombine-max-iterations=1 -S | FileCheck %s
; These tests check the optimizations specific to
; pointers being relocated at a statepoint.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -instcombine-max-iterations=1 -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -instcombine-max-iterations=1 -S | FileCheck %s
; These tests check the optimizations specific to
; pointers being relocated at a statepoint.
-; RUN: opt -instcombine %s -S 2>&1 | FileCheck %s
+; RUN: opt -passes=instcombine %s -S 2>&1 | FileCheck %s
; RUN: opt -aa-pipeline=basic-aa -passes=instcombine %s -S 2>&1 | FileCheck %s
; Checking successful store-load optimization of array length.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
define i32 @test1(i32 %A, i32 %B) {
; CHECK-LABEL: @test1(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -instcombine -dce -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine,dce -S | FileCheck %s
; With sub reassociation, constant folding can eliminate all of the constants.
define i32 @test1(i32 %A, i32 %B) {
; The reassociate pass is not preserving dominance properties correctly
;
-; RUN: opt < %s -reassociate
+; RUN: opt < %s -passes=reassociate
define i32 @compute_dist(i32 %i, i32 %j) {
%reg119 = sub i32 %j, %i ; <i32> [#uses=1]
-; RUN: opt < %s -reassociate -disable-output
+; RUN: opt < %s -passes=reassociate -disable-output
define i32 @test(i32 %A.1, i32 %B.1, i32 %C.1, i32 %D.1) {
%tmp.16 = and i32 %A.1, %B.1 ; <i32> [#uses=1]
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
define i32 @f1(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
; CHECK-LABEL: f1
-; RUN: opt < %s -reassociate
+; RUN: opt < %s -passes=reassociate
; PR9039
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:32:32-n8:16:32"
target triple = "i386-gnu-linux"
-; RUN: opt < %s -reassociate -disable-output
+; RUN: opt < %s -passes=reassociate -disable-output
; PR13041
define void @foo() {
-; RUN: opt -reassociate -disable-output < %s
+; RUN: opt -passes=reassociate -disable-output < %s
; rdar://7507855
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -reassociate %s -S -o - | FileCheck %s
+; RUN: opt -passes=reassociate %s -S -o - | FileCheck %s
; Reassociate pass used to crash on these example
-; RUN: opt < %s -reassociate -disable-output
+; RUN: opt < %s -passes=reassociate -disable-output
; It has been detected that dead loops like the one in this test case can be
; created by -jump-threading (it was detected by a csmith generated program).
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
; Not marked as fast, so must not change.
define float @test1(float %a0, float %a1, float %a2, float %a3, float %a4) {
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
define float @test1(float %A, float %B) {
; CHECK-LABEL: @test1(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
define float @test1(float %A, float %B) {
; CHECK-LABEL: @test1(
-; RUN: opt < %s -reassociate -disable-output
+; RUN: opt < %s -passes=reassociate -disable-output
; PR13021
define float @test2(float %x) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -reassociate %s -S | FileCheck %s
+; RUN: opt -passes=reassociate %s -S | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -dce -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,dce -S | FileCheck %s
; (A&B)&~A == 0
define i32 @test1(i32 %a, i32 %b) {
-; RUN: opt < %s -reassociate -stats -S 2>&1 | FileCheck %s
+; RUN: opt < %s -passes=reassociate -stats -S 2>&1 | FileCheck %s
; REQUIRES: asserts
define i8 @longchain(i8 %in1, i8 %in2, i8 %in3, i8 %in4, i8 %in5, i8 %in6, i8 %in7, i8 %in8, i8 %in9, i8 %in10, i8 %in11, i8 %in12, i8 %in13, i8 %in14, i8 %in15, i8 %in16, i8 %in17, i8 %in18, i8 %in19, i8 %in20) {
-; RUN: opt < %s -reassociate -disable-output
+; RUN: opt < %s -passes=reassociate -disable-output
; PR13021
define i32 @test1(i32 %x) {
-; RUN: opt < %s -reassociate -dce -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,dce -S | FileCheck %s
; MIN_INT cannot be negated during reassociation
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -reassociate %s -S | FileCheck %s
+; RUN: opt -passes=reassociate %s -S | FileCheck %s
define float @foo(float %a,float %b, float %c) {
; CHECK-LABEL: @foo(
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
; Test that we can turn things like A*B + X - A*B -> X.
; Reassociation should apply to Add, Mul, And, Or, & Xor
;
-; RUN: opt < %s -reassociate -instcombine -dce -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine,dce -S | FileCheck %s
define i32 @test_mul(i32 %arg) {
; CHECK-LABEL: test_mul
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -run-twice -reassociate %s -S -o - | FileCheck %s
-; RUN: opt -run-twice -reassociate %s -S -o - | FileCheck %s
+; RUN: opt -run-twice -passes=reassociate %s -S -o - | FileCheck %s
+; RUN: opt -run-twice -passes=reassociate %s -S -o - | FileCheck %s
; The PairMap[NumBinaryOps] used by the Reassociate pass used to have Value
; *pointers as keys and no handling for values being removed. In some cases (in
; Catchswitch is interesting because reassociate previously tried to insert
; into the catchswitch block, which is impossible.
;
-; RUN: opt -reassociate -disable-output < %s
+; RUN: opt -passes=reassociate -disable-output < %s
;
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "catchswitch.cpp"
; Reassociate used to move the negation of $time_1_P14.0 above the
; landingpad.
;
-; RUN: opt -reassociate -disable-output < %s
+; RUN: opt -passes=reassociate -disable-output < %s
;
; ModuleID = 'bugpoint-reduced-simplified.bc'
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
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
; There should be exactly one shift and one add left.
; With shl->mul reassociation, we can see that this is (shl A, 9) * A
;
-; RUN: opt < %s -reassociate -instcombine -S |\
+; RUN: opt < %s -passes=reassociate,instcombine -S |\
; RUN: grep "shl .*, 9"
define i32 @test(i32 %A, i32 %B) {
-; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,instcombine -S | FileCheck %s
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
define i32 @test1(i32 %A, i32 %B) {
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -reassociate -dce < %s | FileCheck %s
+; RUN: opt -S -passes=reassociate,dce < %s | FileCheck %s
; The two va_arg instructions depend on the memory/context, are therfore not
; identical and the sub should not be optimized to 0 by reassociate.
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -reassociate -dce -S | FileCheck %s
+; RUN: opt < %s -passes=reassociate,dce -S | FileCheck %s
; PR12985
; Verify the nsw flags are preserved when converting shl to mul.
-; RUN: opt < %s -sroa
+; RUN: opt < %s -passes=sroa
; Make sure we don't crash on this one.
-; RUN: opt < %s -tailcallelim -verify-dom-info -S | FileCheck %s
+; RUN: opt < %s -passes=tailcallelim -verify-dom-info -S | FileCheck %s
; Check that the "kcfi" operand bundle doesn't prevent tail calls.
define i64 @f_1(i64 %x, ptr %f_0) {
-; RUN: opt %s -tailcallelim -verify-dom-info -pass-remarks=tailcallelim -o /dev/null 2>&1 | FileCheck %s
+; RUN: opt %s -passes=tailcallelim -verify-dom-info -pass-remarks=tailcallelim -o /dev/null 2>&1 | FileCheck %s
; RUN: opt %s -o /dev/null -passes='require<opt-remark-emit>,tailcallelim' -pass-remarks=tailcallelim 2>&1 | FileCheck %s
; CHECK: /home/davide/pat.c:2:20: transforming tail recursion into loop
-; RUN: opt < %s -tailcallelim -verify-dom-info -S | FileCheck %s
+; RUN: opt < %s -passes=tailcallelim -verify-dom-info -S | FileCheck %s
; Check that the "ptrauth" operand bundle doesn't prevent tail calls.
define i64 @f_1(i64 %x, ptr %f_0) {