llvm.org GIT mirror llvm / b4912b9
Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID This is done to avoid odd test failures, like the one fixed in r171243. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171246 91177308-0d34-0410-b5e6-96231b3b80d8 Dmitri Gribenko 6 years ago
48 changed file(s) with 49 addition(s) and 49 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt -analyze -scalar-evolution %s -S | FileCheck %s
0 ; RUN: opt -analyze -scalar-evolution -S < %s | FileCheck %s
11
22 define i16 @test1(i8 %x) {
33 %A = zext i8 %x to i12
None ; RUN: opt -codegenprepare %s -S -o - | FileCheck %s
0 ; RUN: opt -codegenprepare -S < %s | FileCheck %s
11
22 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"
33 target triple = "x86_64-apple-darwin10.0.0"
None ; RUN: opt -S -constmerge %s | FileCheck %s
0 ; RUN: opt -S -constmerge < %s | FileCheck %s
11
22 ; CHECK: @foo = constant i32 6
33 ; CHECK: @bar = constant i32 6
None ; RUN: opt -constmerge %s -S -o - | FileCheck %s
0 ; RUN: opt -constmerge -S < %s | FileCheck %s
11 ; PR8978
22
33 declare i32 @zed(%struct.foobar*, %struct.foobar*)
None ; RUN: opt -constmerge %s -S -o - | FileCheck %s
0 ; RUN: opt -constmerge -S < %s | FileCheck %s
11 ; Test that in one run var3 is merged into var2 and var1 into var4.
22 ; Test that we merge @var5 and @var6 into one with the higher alignment, and
33 ; don't merge var7/var8 into var5/var6.
None ; RUN: opt -constmerge %s -S -o - | FileCheck %s
0 ; RUN: opt -constmerge -S < %s | FileCheck %s
11 ; Test which corresponding x and y are merged and that unnamed_addr
22 ; is correctly set.
33
None ; RUN: opt -deadargelim -S %s | FileCheck %s
0 ; RUN: opt -deadargelim -S < %s | FileCheck %s
11
22 define void @test(i32) {
33 ret void
None ; RUN: opt -basicaa -dse -S -o - %s | FileCheck %s
0 ; RUN: opt -basicaa -dse -S < %s | FileCheck %s
11 ; PR11390
22 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"
33 target triple = "x86_64-unknown-linux-gnu"
None ; RUN: opt -S -basicaa -gvn -enable-load-pre %s | FileCheck %s
0 ; RUN: opt -S -basicaa -gvn -enable-load-pre < %s | FileCheck %s
11 ;
22 ; The partially redundant load in bb1 should be hoisted to "bb". This comes
33 ; from this C code (GCC PR 23455):
None ; RUN: opt -S -gvn -enable-load-pre %s | FileCheck %s
0 ; RUN: opt -S -gvn -enable-load-pre < %s | FileCheck %s
11 ;
22 ; Make sure the load in bb3.backedge is removed and moved into bb1 after the
33 ; call. This makes the non-call case faster.
None ; RUN: opt -globalopt %s -S | FileCheck %s
0 ; RUN: opt -globalopt -S < %s | FileCheck %s
11 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"
22 target triple = "x86_64-apple-darwin10.0.0"
33
None ; RUN: opt -globalopt %s -S -o - | FileCheck %s
0 ; RUN: opt -globalopt -S < %s | FileCheck %s
11 ; PR10047
22
33 %0 = type { i32, void ()* }
None ; RUN: opt -S -indvars %s | FileCheck %s
0 ; RUN: opt -S -indvars < %s | FileCheck %s
11
22 ; The indvar simplification code should ensure that the first PHI in the block
33 ; is the canonical one!
0 ; This test ensures that alloca instructions in the entry block for an inlined
11 ; function are moved to the top of the function they are inlined into.
22 ;
3 ; RUN: opt -S -inline %s | FileCheck %s
3 ; RUN: opt -S -inline < %s | FileCheck %s
44
55 define i32 @func(i32 %i) {
66 %X = alloca i32 ; [#uses=1]
None ; RUN: opt -basicaa -inline -S -scalarrepl -gvn -instcombine %s | FileCheck %s
0 ; RUN: opt -basicaa -inline -S -scalarrepl -gvn -instcombine < %s | FileCheck %s
11 ; PR5009
22
33 ; CHECK: define i32 @main()
None ; RUN: opt -S -basicaa -inline -scalarrepl -instcombine -simplifycfg -instcombine -gvn -globaldce %s | FileCheck %s
0 ; RUN: opt -S -basicaa -inline -scalarrepl -instcombine -simplifycfg -instcombine -gvn -globaldce < %s | FileCheck %s
11 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"
22 target triple = "x86_64-apple-darwin10.0.0"
33
None ; RUN: opt -basicaa -inline -gvn %s -S -max-cg-scc-iterations=1 | FileCheck %s
0 ; RUN: opt -basicaa -inline -gvn -S -max-cg-scc-iterations=1 < %s | FileCheck %s
11 ; rdar://6295824 and PR6724
22
33 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"
None ; RUN: opt -S -Oz %s | FileCheck %s -check-prefix=OZ
1 ; RUN: opt -S -O2 %s | FileCheck %s -check-prefix=O2
0 ; RUN: opt -S -Oz < %s | FileCheck %s -check-prefix=OZ
1 ; RUN: opt -S -O2 < %s | FileCheck %s -check-prefix=O2
22
33 ; The inline threshold for a function with the optsize attribute is currently
44 ; the same as the global inline threshold for -Os. Check that the optsize
None ; RUN: opt -inline %s -S -o - | FileCheck %s
0 ; RUN: opt -inline -S < %s | FileCheck %s
11
22 declare void @use(i8* %a)
33
None ; RUN: opt -inline %s -S -o - | FileCheck %s
0 ; RUN: opt -inline -S < %s | FileCheck %s
11 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"
22
33 declare void @llvm.lifetime.start(i64, i8*)
11 ; This effectively is just peeling off the first iteration of a loop, and the
22 ; inliner heuristics are not set up for this.
33
4 ; RUN: opt -inline %s -S | FileCheck %s
4 ; RUN: opt -inline -S < %s | FileCheck %s
55
66 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"
77 target triple = "x86_64-apple-darwin10.3"
None ; RUN: opt -S -instcombine %s | FileCheck %s
0 ; RUN: opt -S -instcombine < %s | FileCheck %s
11 ; PR2297
22 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"
33 target triple = "i386-apple-darwin8"
None ; RUN: opt -instcombine -S %s | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11 ; PR6486
22
33 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"
None ; RUN: opt -instcombine %s -S -o - | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11 ; PR7265
22
33 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"
None ; RUN: opt -instcombine -S -o - %s | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11
22 ; CHECK-NOT: getelementptr
33 ; CHECK-NOT: ptrtoint
None ; RUN: opt -instcombine %s -S | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11
22 ; Check that code corresponding to the following C function is
33 ; simplified into a single ASR operation:
None ; RUN: opt -instcombine -S %s | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11
22 define void @test(<4 x float> *%in_ptr, <4 x float> *%out_ptr) {
33 %A = load <4 x float>* %in_ptr, align 16
None ; RUN: opt -instcombine %s -S | FileCheck %s
0 ; RUN: opt -instcombine -S < %s | FileCheck %s
11
22 ;; This tests that the instructions in the entry blocks are sunk into each
33 ;; arm of the 'if'.
None ; RUN: opt -S -instcombine %s | FileCheck %s
0 ; RUN: opt -S -instcombine < %s | FileCheck %s
11
22 define float @test1(float %x) nounwind readnone ssp {
33 entry:
None ; RUN: opt -jump-threading -S %s | FileCheck %s
0 ; RUN: opt -jump-threading -S < %s | FileCheck %s
11 ; rdar://7620633
22
33 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"
None ; RUN: opt -licm -S %s | FileCheck %s
0 ; RUN: opt -licm -S < %s | FileCheck %s
11
22 @A = common global [1024 x float] zeroinitializer, align 4
33
None ; RUN: opt -S -loop-rotate %s | FileCheck %s
0 ; RUN: opt -S -loop-rotate < %s | FileCheck %s
11 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"
22 target triple = "x86_64-apple-darwin10.0.0"
33
None ; RUN: opt -S -loop-rotate %s | FileCheck %s
0 ; RUN: opt -S -loop-rotate < %s | FileCheck %s
11
22 declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
33 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
None ; RUN: opt -S %s -loop-rotate | FileCheck %s
0 ; RUN: opt -S -loop-rotate < %s | FileCheck %s
11 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"
22 target triple = "x86_64-apple-darwin10.0"
33
11 ; having overlapping live ranges that result in copies. We want the setcc
22 ; instruction immediately before the conditional branch.
33 ;
4 ; RUN: opt -S -loop-reduce %s | FileCheck %s
4 ; RUN: opt -S -loop-reduce < %s | FileCheck %s
55
66 define void @foo(float* %D, i32 %E) {
77 entry:
0 ; RUN: opt -loop-unswitch -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
1 ; RUN: opt -S -loop-unswitch -verify-loop-info -verify-dom-info %s | FileCheck %s
1 ; RUN: opt -S -loop-unswitch -verify-loop-info -verify-dom-info < %s | FileCheck %s
22
33 ; STATS: 1 loop-simplify - Number of pre-header or exit blocks inserted
44 ; STATS: 2 loop-unswitch - Number of switches unswitched
0 ; RUN: opt -loop-unswitch -loop-unswitch-threshold 13 -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
1 ; RUN: opt -S -loop-unswitch -loop-unswitch-threshold 13 -verify-loop-info -verify-dom-info %s | FileCheck %s
1 ; RUN: opt -S -loop-unswitch -loop-unswitch-threshold 13 -verify-loop-info -verify-dom-info < %s | FileCheck %s
22
33 ; STATS: 1 loop-simplify - Number of pre-header or exit blocks inserted
44 ; STATS: 1 loop-unswitch - Number of switches unswitched
0 ; RUN: opt -loop-unswitch -loop-unswitch-threshold 1000 -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
1 ; RUN: opt -S -loop-unswitch -loop-unswitch-threshold 1000 -verify-loop-info -verify-dom-info %s | FileCheck %s
1 ; RUN: opt -S -loop-unswitch -loop-unswitch-threshold 1000 -verify-loop-info -verify-dom-info < %s | FileCheck %s
22
33 ; STATS: 1 loop-simplify - Number of pre-header or exit blocks inserted
44 ; STATS: 3 loop-unswitch - Number of switches unswitched
None ; RUN: opt -O2 %s -S -o - | FileCheck %s
0 ; RUN: opt -O2 -S < %s | FileCheck %s
11
22 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"
33 target triple = "x86_64-apple-darwin11.1"
None ; RUN: opt -O3 -S %s | FileCheck %s
0 ; RUN: opt -O3 -S < %s | FileCheck %s
11 ; XFAIL: *
22
33 declare i32 @doo(...)
None ; RUN: opt -O3 -S %s | FileCheck %s
0 ; RUN: opt -O3 -S < %s | FileCheck %s
11
22 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"
33 target triple = "x86_64-apple-macosx10.6.7"
None ; RUN: opt -O2 -S %s | FileCheck %s
0 ; RUN: opt -O2 -S < %s | FileCheck %s
11
22 ; Run global DCE to eliminate unused ctor and dtor.
33 ; rdar://9142819
None ; RUN: opt -O3 -S -analyze -scalar-evolution %s | FileCheck %s
0 ; RUN: opt -O3 -S -analyze -scalar-evolution < %s | FileCheck %s
11 ;
22 ; This file contains phase ordering tests for scalar evolution.
33 ; Test that the standard passes don't obfuscate the IR so scalar evolution can't
None ; RUN: opt -ipsccp -S %s | FileCheck %s
0 ; RUN: opt -ipsccp -S < %s | FileCheck %s
11 ; PR6414
22 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"
33 target triple = "x86_64-unknown-linux-gnu"
None ; RUN: opt -simplifycfg -S %s | FileCheck %s
0 ; RUN: opt -simplifycfg -S < %s | FileCheck %s
11
22 %0 = type { i32*, i32* }
33
None ; RUN: opt -S -simplifycfg %s | FileCheck %s
0 ; RUN: opt -S -simplifycfg < %s | FileCheck %s
11
22 define i8* @test1(i8* %x, i64 %y) nounwind {
33 entry:
None ; RUN: opt -S -simplify-libcalls -instcombine %s | FileCheck %s
0 ; RUN: opt -S -simplify-libcalls -instcombine < %s | FileCheck %s
11 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"
22 target triple = "x86_64-apple-macosx10.8.0"
33
None ; RUN: opt -tailcallelim %s -S | FileCheck %s
0 ; RUN: opt -tailcallelim -S < %s | FileCheck %s
11 ; PR615
22
33 declare void @bar(i32*)