llvm.org GIT mirror llvm / 73e7082
Update tests that need to be run through llvm-upgrade. This is necessary for upcoming changes to the llvm assembly grammar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32768 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
41 changed file(s) with 78 addition(s) and 62 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | opt -dse | llvm-dis | grep 'store int 0'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep 'store int 0'
11
22 void %test({int,int }* %P) {
33 %Q = getelementptr {int,int}* %P, int 1
0 ; Check to make sure that Value Numbering doesn't merge casts of different
11 ; flavors.
2 ; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep '[sz]ext' | wc -l | grep 2
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \
3 ; RUN: grep '[sz]ext' | wc -l | grep 2
34
45 declare void %external(int)
56
0 ; Make sure we don't get an assertion failure, even though this is a parse
11 ; error
2 ; RUN: llvm-as < %s 2>&1 | grep 'No arguments'
2 ; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f 2>&1 | grep 'No arguments'
33
44 %ty = type void (int)
55
22
33 %d_reduction_0_dparser_gram = global { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)*, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** } { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)* null, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** null }
44
5 implementation
None ; RUN: llvm-as < %s > /dev/null
0 ; RUN: llvm-upgrade < %s | llvm-as > /dev/null
11 void %t() {
22 entry:
33 ret void
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-upgrade < %s | llvm-as -o /dev/null -f
33
44 "complex long double" = type { double, double }
55 "struct.std::dcomplex" = type { "complex long double" }
0 ; Basic test for bugpoint.
1 ; RUN: bugpoint %s -domset -idom -domset -bugpoint-crashcalls -domset -idom -domset
1 ; RUN: llvm-upgrade < %s > %t1.ll
2 ; RUN: bugpoint %t1.ll -domset -idom -domset -bugpoint-crashcalls \
3 ; RUN: -domset -idom -domset
24
35 int %test() {
46 call int %test()
0 ; Test that bugpoint can narrow down the testcase to the important function
11 ;
2 ; RUN: bugpoint %s -bugpoint-crashcalls
2 ; RUN: llvm-upgrade < %s > %t1.ll
3 ; RUN: bugpoint %t1.ll -bugpoint-crashcalls
34
45 int %foo() { ret int 1 }
56
None ; RUN: PATH=/usr/bin:/bin/:${PATH}
1 ; RUN: export PATH
2 ; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg
0 ; RUN: llvm-upgrade < %s > %t1.ll
1 ; RUN: bugpoint %t1.ll -dce -bugpoint-deletecalls -simplifycfg
32
43 %.LC0 = internal global [13 x sbyte] c"Hello World\0A\00"
54
None ; RUN: bugpoint %s -bugpoint-crashcalls
0 ; RUN: llvm-upgrade < %s > %t1.ll
1 ; RUN: bugpoint %t1.ll -bugpoint-crashcalls
12
23 ; Test to make sure that arguments are removed from the function if they are unnecessary.
34
0 ; This test ensures that we get a bitcast constant expression in and out,
11 ; not a sitofp constant expression.
2 ; RUN: llvm-as < %s | llvm-dis | grep 'bitcast ('
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 'bitcast ('
33 %G = external global int
44
55 float %tryit(int %A) {
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11
22 void %frame_dummy() {
33 entry:
None ; RUN: llvm-as < %s | llc -march=c &&
1 ; RUN: llvm-as < %s | llc -march=c | grep '__BITCAST' | wc -l | grep 14
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | \
2 ; RUN: grep '__BITCAST' | wc -l | grep 14
23
34 int %test1(float %F) {
45 %X = bitcast float %F to int
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 ; Compiling this file produces:
33 ; Sparc.cpp:91: failed assertion `(offset - OFFSET) % getStackFrameSizeAlignment() == 0'
None ; RUN: llvm-as < %s | llc -march=x86
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86
11 ; PR1049
22 target datalayout = "e-p:32:32"
33 target endian = little
None ; RUN: llvm-as < %s | llc -march=ppc64 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 &&
2 ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc
33
44 void %bitap() {
55 entry:
None ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel
11 ; PR1061
22
33 target datalayout = "e-p:32:32"
None ; RUN: llvm-as < %s | llc &&
1 ; RUN: llvm-as < %s | llc -march=x86 &&
2 ; RUN: llvm-as < %s | llc -march=x86-64
0 ; RUN: llvm-upgrade < %s | llvm-as | llc &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64
33 ; PR1033
44
55 long %test1(double %t) {
None ; RUN: llvm-as < %s | llc -march=x86 |grep "foos+5" &&
1 ; RUN: llvm-as < %s | llc -march=x86 |grep "foos+1" &&
2 ; RUN: llvm-as < %s | llc -march=x86 |grep "foos+9" &&
3 ; RUN: llvm-as < %s | llc -march=x86 |grep "bara+19" &&
4 ; RUN: llvm-as < %s | llc -march=x86 |grep "bara+4"
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 |grep "foos+5" &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 |grep "foos+1" &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 |grep "foos+9" &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 |grep "bara+19" &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 |grep "bara+4"
55
66 ; make sure we compute the correct offset for a packed structure
77
None ; RUN: llvm-as< %s | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah &&
1 ; RUN: llvm-as< %s | opt -scalarrepl -instcombine | llc -march=x86 -mcpu=yonah | not grep sub.*esp
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
1 ; RUN: llc -march=x86 -mcpu=yonah &&
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -instcombine | \
3 ; RUN: llc -march=x86 -mcpu=yonah | not grep sub.*esp
24
35 ; This checks that various insert/extract idiom work without going to the
46 ; stack.
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; PR1029
22
33 target datalayout = "e-p:64:64"
None ;; RUN: llvm-as < %s | llc
0 ;; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 ;; Debugger type declarations
33 %llvm.dbg.anchor.type = type { uint, uint }
0 ; This fails because the linker renames the external symbol not the internal
11 ; one...
22
3 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | llvm-as > %t.1.bc
4 ; RUN: llvm-as < %s > %t.2.bc
3 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | llvm-upgrade |\
4 ; RUN: llvm-as > %t.1.bc
5 ; RUN: llvm-upgrade < %s | llvm-as -o %t.2.bc -f
56 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep '%foo()' | grep -v internal
67
78 implementation
None ; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | llvm-as > %t.1.bc
1 ; RUN: llvm-as < %s > %t.2.bc
0 ; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | llvm-upgrade | llvm-as > %t.1.bc
1 ; RUN: llvm-upgrade < %s | llvm-as -o %t.2.bc -f
22 ; RUN: llvm-link %t.[12].bc
33 %X = external global int
44
0 ; This fails because the linker renames the non-opaque type not the opaque
11 ; one...
22
3 ; RUN: echo "implementation linkonce void %foo() { ret void } " | llvm-as > %t.2.bc
4 ; RUN: llvm-as < %s > %t.1.bc
3 ; RUN: echo "implementation linkonce void %foo() { ret void } " | llvm-upgrade|\
4 ; RUN: llvm-as -o %t.2.bc -f
5 ; RUN: llvm-upgrade < %s | llvm-as -o %t.1.bc -f
56 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep foo | grep linkonce
67
78 declare void %foo()
None ; RUN: llvm-as < %s > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-as > %t.out2.bc
0 ; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc
22 ; RUN: llvm-link %t.out[21].bc
33
44 %S = type opaque
None ; RUN: llvm-as < %s > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-as > %t.out2.bc
0 ; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc
22 ; RUN: llvm-link %t.out[21].bc
33
44 %S = type opaque
None ; RUN: llvm-as < %s > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-as > %t.out2.bc
0 ; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc
1 ; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc
22 ; RUN: llvm-link %t.out[21].bc
33
44 %S = type opaque
None ; RUN: llvm-as -f < %s > %t1.bc
1 ; RUN: llvm-as -f < `dirname %s`/2004-05-07-TypeResolution2.ll > %t2.bc
0 ; RUN: llvm-upgrade < %s | llvm-as -f -o %t1.bc
1 ; RUN: llvm-upgrade < `dirname %s`/2004-05-07-TypeResolution2.ll | \
2 ; RUN: llvm-as -o %t2.bc -f
23 ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc
34
45 target endian = little
0 ; Test that appending linkage works correctly.
11
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-as > %t.2.bc
3 ; RUN: llvm-as < %s > %t.1.bc
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-upgrade | \
3 ; RUN: llvm-as > %t.2.bc
4 ; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc
45 ; RUN: llvm-link %t.[12].bc | llvm-dis | grep 7 | grep 4 | grep 8
56
67 %X = appending global [2 x int] [int 7, int 4]
None ; RUN: llvm-as < %s > %t.bc
1 ; RUN: llvm-as < `dirname %s`/testlink2.ll > %t2.bc
0 ; RUN: llvm-upgrade < %s | llvm-as > %t.bc
1 ; RUN: llvm-upgrade < `dirname %s`/testlink2.ll | llvm-as > %t2.bc
22 ; RUN: llvm-link %t.bc %t2.bc
33
44 %MyVar = external global int
None ; RUN: llvm-as < %s | opt -adce
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -adce
11
22 void "test"()
33 begin
None ; RUN: llvm-as < %s | opt -indvars -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -indvars -disable-output
11
22 target datalayout = "e-p:32:32"
33 target endian = little
None ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep zext
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep zext
11
22 ; Never merge these two conversions, even though it's possible: this is
33 ; significantly more expensive than the two conversions on some targets
None ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'icmp' | wc -l | grep 1
1 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'icmp ugt' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
1 ; RUN: grep 'icmp' | wc -l | grep 1
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
3 ; RUN: grep 'icmp ugt' | wc -l | grep 1
4 ;
25 ; ModuleID = 'bugpoint-tooptimize.bc'
36 target datalayout = "e-p:32:32"
47 target endian = little
0 ; For PR1065. This causes an assertion in instcombine if a select with two cmp
11 ; operands is encountered.
2 ; RUN: llvm-as < %s | opt -instcombine -disable-output
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
33 ; ModuleID = 'PR1065.bc'
44 target datalayout = "e-p:32:32"
55 target endian = little
None ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep shl
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep shl
11
22 bool %test(int %X, ubyte %A) {
33 %B = lshr int %X, ubyte %A
11 ; LevelRaise should eliminate all cast instructions from this testcase.
22 ;
33 ; XFAIL: *
4 ; RUN: llvm-as < %s | opt -raise | llvm-dis | notcast
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -raise | llvm-dis | notcast
55
66 %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
77 %hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }
None ; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep 'ret bool false'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | \
1 ; RUN: grep 'ret bool false'
12
23 bool %foo() {
34 %X = and bool false, undef
None ; RUN: llvm-as < %s | opt -scalarrepl -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl -disable-output
11 ; PR1045
22
33 target datalayout = "e-p:32:32"
None ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis
11 ; ModuleID = 'bugpoint-tooptimize.bc'
22 target datalayout = "e-p:32:32"
33 target endian = little