llvm.org GIT mirror llvm / 5edf210
Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51357 91177308-0d34-0410-b5e6-96231b3b80d8 Gabor Greif 12 years ago
93 changed file(s) with 94 addition(s) and 94 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; This testcase failed due to a bad assertion in SymbolTable.cpp, removed in
33 ; the 1.20 revision. Basically the symbol table assumed that if there was an
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; This testcase used to fail due to a lack of this diff in Value.cpp:
33 ; diff -r1.16 Value.cpp
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 %Hosp = type { i32, i32, i32, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* } }
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; Method arguments were being checked for collisions at the global scope before
33 ; the method object was created by the parser. Because of this, false
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; Another name collision problem. Here the problem was that if a forward
33 ; declaration for a method was found, that this would cause spurious conflicts
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 type { { \2 *, \4 ** },
33 { \2 *, \4 ** }
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 %t = type { { \2*, \2 },
33 { \2*, \2 }
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 %Hosp = type { { \2*, { \2, %Hosp }* }, { \2*, { \2, %Hosp }* } }
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 ; It looks like the assembler is not forward resolving the function declaraion
22 ; correctly.
33
0 ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too
11 ; long. The type resolution code needs to be sped up a lot.
2 ; RUN: llvm-as < %s -o /dev/null -f
2 ; RUN: llvm-as %s -o /dev/null -f
33 %ALL_INTERSECTIONS_METHOD = type i32 (%OBJECT*, %RAY*, %ISTACK*)*
44 %BBOX = type { %BBOX_VECT, %BBOX_VECT }
55 %BBOX_TREE = type { i16, i16, %BBOX, %BBOX_TREE** }
0 ; Make sure we don't get an assertion failure, even though this is a parse
11 ; error
2 ; RUN: not llvm-as < %s -o /dev/null -f |& grep {No arguments}
2 ; RUN: not llvm-as %s -o /dev/null -f |& grep {No arguments}
33
44 %ty = type void (i32)
55
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 define void @test(i32 %X) {
33 call void @test( i32 6 )
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1]
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; Dominance relationships is not calculated correctly for unreachable blocks,
33 ; which causes the verifier to barf on this input.
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 ; This testcase comes from the following really simple c file:
22 ;; int foo[30000]
33 ;;; We should not be soo slow for such a simple case!
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 declare i32 @"ArrayRef"([100 x i32] * %Array)
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 @X = external global i32*
33 @X1 = external global %T*
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 @spell_order = global [4 x i8] c"\FF\00\F7\00"
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 ; There should be absolutely no problem with this testcase.
22
33 define i32 @test(i32 %arg1, i32 %arg2) {
0 ; This bug was caused by two CPR's existing for the same global variable,
11 ; colliding in the Module level CPR map.
2 ; RUN: llvm-as < %s -o /dev/null -f
2 ; RUN: llvm-as %s -o /dev/null -f
33
44 define void @test() {
55 call void (...)* bitcast (void (i16*, i32)* @AddString to void (...)*)( i16* null, i32 0 )
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; Check minimal switch statement
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 ; Test that shift instructions can be used in constant expressions.
22
33 global i32 3670016
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; The old C front-end never generated empty structures, now the new one
33 ; can. For some reason we never handled them in the parser. Weird.
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 %MidFnTy = type void (%MidFnTy*)
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 %T = type i32
33 @X = global i32* null ; [#uses=0]
None ; RUN: not llvm-as < %s -o /dev/null -f |& grep {Undefined type remains}
0 ; RUN: not llvm-as %s -o /dev/null -f |& grep {Undefined type remains}
11 ; END.
22
33 @d_reduction_0_dparser_gram = global {
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 ; %inc2 uses it's own value, but that's ok, as it's unreachable!
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 define i32* @t1({ float, i32 }* %X) {
33 %W = getelementptr { float, i32 }* %X, i32 20, i32 1 ; [#uses=0]
0 ; Check to see that the verifier does not take an outrageous amount of time on
11 ; this testcase.
2 ; RUN: llvm-as < %s -o /dev/null -f
2 ; RUN: llvm-as %s -o /dev/null -f
33
44 %"complex long double" = type { double, double }
55 %"struct.std::dcomplex" = type { %"complex long double" }
0 ;; The bytecode writer was trying to treat undef values as ConstantArray's when
11 ;; they looked like strings.
2 ;; RUN: llvm-as < %s -o /dev/null -f
2 ;; RUN: llvm-as %s -o /dev/null -f
33 @G = internal global [8 x i8] undef
44
0 ; Test for PR463. This program is erroneous, but should not crash llvm-as.
1 ; RUN: not llvm-as < %s -o /dev/null -f |& \
1 ; RUN: not llvm-as %s -o /dev/null -f |& \
22 ; RUN: grep {Cannot create a null initialized value of this type}
33
44 @.FOO = internal global %struct.none zeroinitializer
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 define void @test() {
33 call {i32} @foo()
0 ; The assembler should catch an undefined argument type .
1 ; RUN: not llvm-as < %s -o /dev/null -f |& grep {Reference to abstract argument}
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {Reference to abstract argument}
22
33 ; %typedef.bc_struct = type opaque
44
0 ; Test Case for PR1080
1 ; RUN: llvm-as < %s -o /dev/null -f
1 ; RUN: llvm-as %s -o /dev/null -f
22
33 @str = internal constant [4 x i8] c"-ga\00" ; <[4 x i8]*> [#uses=2]
44
0 ; PR1117
1 ; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
22
33 define i8* @nada(i64 %X) {
44 %result = trunc i64 %X to i8*
0 ; PR1117
1 ; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
1 ; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
22
33 @X = constant i8* trunc (i64 0 to i8*)
None ; RUN: not llvm-as < %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic}
0 ; RUN: not llvm-as %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic}
11
22 declare i32 @llvm.foobar(i32 %foo)
33
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22
33 define i32 @test(i1 %C, i32 %V1, i32 %V2) {
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11
22 define void @test(i32* %P, i32* %Q) {
33 entry:
None ; RUN: llvm-as < %s -o - | llc
0 ; RUN: llvm-as %s -o - | llc
11
22 ; This caused the backend to assert out with:
33 ; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
None ; RUN: llvm-as < %s -o - | llc
0 ; RUN: llvm-as %s -o - | llc
11
22 ; July 6, 2002 -- LLC Regression test
33 ; This test case checks if the integer CC register %xcc (or %ccr)
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1]
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @foo(i32 %X, i32 %Y, double %A) {
None ; RUN: llvm-as < %s -o %t.bc -f
0 ; RUN: llvm-as %s -o %t.bc -f
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; We were accidentally inverting the signedness of right shifts. Whoops.
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @bar(i8* %X) {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 target datalayout = "e-p:32:32"
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; Testcase distilled from 256.bzip2.
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; Testcase distilled from 256.bzip2.
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This testcase failed to work because two variable sized allocas confused the
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ;
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This testcase exposes a bug in the local register allocator where it runs out
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @A = global i32 0 ; [#uses=1]
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli -debug-only=jit %t.bc |& not grep {Finished CodeGen of .*Function: F}
22 @.str_1 = internal constant [7 x i8] c"IN F!\0A\00" ; <[7 x i8]*> [#uses=1]
33 @.str_2 = internal constant [7 x i8] c"IN G!\0A\00" ; <[7 x i8]*> [#uses=1]
None ; RUN: llvm-as < %s -o - | lli -force-interpreter
0 ; RUN: llvm-as %s -o - | lli -force-interpreter
11 ; PR1836
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -o - | lli -force-interpreter
0 ; RUN: llvm-as %s -o - | lli -force-interpreter
11
22 target datalayout = "E"
33
None ; RUN: llvm-as < %s -o - | lli -force-interpreter
0 ; RUN: llvm-as %s -o - | lli -force-interpreter
11
22 target datalayout = "e"
33
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1]
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 @X = global i32 7 ; [#uses=0]
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @bar() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test unconditional branch
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 declare void @exit(i32)
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @foo() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; This tests to make sure that we can evaluate weird constant expressions
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define double @test(double* %DP, double %Arg) {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test phi node
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 ; test return instructions
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: llvm-as < %s -f -o %t.bc
0 ; RUN: llvm-as %s -f -o %t.bc
11 ; RUN: lli %t.bc > /dev/null
22
33 define i32 @main() {
None ; RUN: not llvm-as < %s -o /dev/null -f |& grep \
0 ; RUN: not llvm-as %s -o /dev/null -f |& grep \
11 ; RUN: "Redefinition of global variable named 'B'"
22 ; END.
33
11 ; one...
22
33 ; RUN: echo {define internal i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc
4 ; RUN: llvm-as < %s -o %t.2.bc -f
4 ; RUN: llvm-as %s -o %t.2.bc -f
55 ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep @foo() | grep -v internal
66
77 define i32 @foo() { ret i32 0 }
0 ; RUN: echo {@X = linkonce global i32 5 \
11 ; RUN: define linkonce i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc
2 ; RUN: llvm-as < %s -o %t.2.bc -f
2 ; RUN: llvm-as %s -o %t.2.bc -f
33 ; RUN: llvm-link %t.1.bc %t.2.bc
44 @X = external global i32
55
22
33 ; RUN: echo { define linkonce void @foo() \{ ret void \} } | \
44 ; RUN: llvm-as -o %t.2.bc -f
5 ; RUN: llvm-as < %s -o %t.1.bc -f
5 ; RUN: llvm-as %s -o %t.1.bc -f
66 ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep foo | grep linkonce
77
88 declare void @foo()
11 ; the same type to be created!
22
33 ; RUN: echo {%T = type i32} | llvm-as > %t.2.bc
4 ; RUN: llvm-as < %s -f > %t.1.bc
4 ; RUN: llvm-as %s -f -o %t.1.bc
55 ; RUN: llvm-link %t.1.bc %t.2.bc
66
77 %T = type opaque
None ; RUN: llvm-as < %s -f -o %t1.bc
0 ; RUN: llvm-as %s -f -o %t1.bc
11 ; RUN: llvm-as < %p/2004-05-07-TypeResolution2.ll -o %t2.bc -f
22 ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc
33
None ; RUN: llvm-as < %s -f -o %t1.bc
0 ; RUN: llvm-as %s -f -o %t1.bc
11 ; RUN: llvm-link -f -o %t2.bc %t1.bc
22
33 target datalayout = "E-p:32:32"
None ; RUN: llvm-as < %s -o - | opt -inline | llvm-dis | grep nounwind
1 ; RUN: llvm-as < %s -o - | opt -inline | llvm-dis | grep unreachable
0 ; RUN: llvm-as %s -o - | opt -inline | llvm-dis | grep nounwind
1 ; RUN: llvm-as %s -o - | opt -inline | llvm-dis | grep unreachable
22
33 declare i1 @extern()
44
88 ; be eliminated. In many cases the setCC is also eliminated based on the
99 ; constant value and the range of the casted value.
1010 ;
11 ; RUN: llvm-as < %s -o - | opt -instcombine | llvm-dis | \
11 ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
1212 ; RUN: notcast .*int
1313 ; END.
1414 define i1 @lt_signed_to_large_unsigned(i8 %SB) {
0 ; The optimizer should be able to remove cast operation here.
1 ; RUN: llvm-as < %s -o - | opt -instcombine | llvm-dis | \
1 ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
22 ; RUN: not grep sext.*i32
33
44 define i1 @eq_signed_to_small_unsigned(i8 %SB) {
None ; RUN: not llvm-as < %s -o /dev/null
0 ; RUN: not llvm-as %s -o /dev/null
11
22 %struct = type { }
33
None ; RUN: not llvm-as < %s -o /dev/null -f
0 ; RUN: not llvm-as %s -o /dev/null -f
11 declare void @h(i32 byval %num)
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 %s = type opaque
22 declare void @h(%s* byval %num)
None ; RUN: llvm-as < %s -o /dev/null -f
0 ; RUN: llvm-as %s -o /dev/null -f
11 %struct.foo = type { i64 }
22
33 declare void @h(%struct.foo* byval %num)
None ; RUN: not llvm-as < %s -f |& grep {not verify as correct}
0 ; RUN: not llvm-as %s -f |& grep {not verify as correct}
11 ; PR1042
22
33 define i32 @foo() {