llvm.org GIT mirror llvm / 9085043
For PR411: Update these tests to not use the same name even though the type of the value differs. After PR411 hits, type planes will be gone and it will be illegal for a name to be used twice, regardless of type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33660 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
21 changed file(s) with 66 addition(s) and 65 deletion(s). Raw diff Collapse all Expand all
1818
1919 bb3: ; preds = %bb, %entry
2020 %i.0 = phi i32 [ 0, %entry ], [ %tmp2, %bb ] ; [#uses=3]
21 %tmp = icmp sle i32 %i.0, 9999 ; [#uses=1]
22 br i1 %tmp, label %bb, label %bb5
21 %tmp3 = icmp sle i32 %i.0, 9999 ; [#uses=1]
22 br i1 %tmp3, label %bb, label %bb5
2323
2424 bb5: ; preds = %bb3
2525 br label %return
2727 return: ; preds = %bb5
2828 ret void
2929 }
30
31
3333 %tmp606 = load i32* %tmp605 ; [#uses=1]
3434 %tmp612 = load i32* null ; [#uses=1]
3535 %tmp629 = load i32* null ; [#uses=1]
36 %tmp629 = sitofp i32 %tmp629 to double ; [#uses=1]
37 %tmp631 = mul double %tmp629, 0.000000e+00 ; [#uses=1]
36 %tmp629a = sitofp i32 %tmp629 to double ; [#uses=1]
37 %tmp631 = mul double %tmp629a, 0.000000e+00 ; [#uses=1]
3838 %tmp632 = add double 0.000000e+00, %tmp631 ; [#uses=1]
3939 %tmp642 = call fastcc i32 @sign( i32 %tmp576, i32 %tmp561 ) ; [#uses=1]
4040 %tmp650 = mul i32 %tmp606, %tmp642 ; [#uses=1]
4343 %tmp659 = ashr i32 %tmp658, i8 6 ; [#uses=1]
4444 %tmp660 = sub i32 0, %tmp659 ; [#uses=1]
4545 %tmp666 = sub i32 %tmp660, %tmp496 ; [#uses=1]
46 %tmp666 = sitofp i32 %tmp666 to double ; [#uses=2]
46 %tmp667 = sitofp i32 %tmp666 to double ; [#uses=2]
4747 call void @levrun_linfo_inter( i32 %tmp576, i32 0, i32* null, i32* null )
48 %tmp671 = mul double %tmp666, %tmp666 ; [#uses=1]
48 %tmp671 = mul double %tmp667, %tmp667 ; [#uses=1]
4949 %tmp675 = add double %tmp671, 0.000000e+00 ; [#uses=1]
5050 %tmp678 = fcmp oeq double %tmp632, %tmp675 ; [#uses=1]
5151 br i1 %tmp678, label %cond_true679, label %cond_false693
55 define float @test1(float %x, double %y) {
66 %tmp = fpext float %x to double
77 %tmp2 = tail call double @copysign( double %tmp, double %y )
8 %tmp2 = fptrunc double %tmp2 to float
9 ret float %tmp2
8 %tmp3 = fptrunc double %tmp2 to float
9 ret float %tmp3
1010 }
1111
1212 define double @test2(double %x, float %y) {
4242 ret double %tmp
4343 }
4444
45 float %h() {
45 float %h2() {
4646 entry:
4747 ret float 1.000000e+00
4848 }
None ; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | grep cntlzw
0 ; RUN: llvm-as < %s | llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
1 ; RUN: grep cntlzw
12
23 define i32 @foo() {
34 entry:
45 %retval = alloca i32, align 4 ; [#uses=2]
5 %tmp = alloca i32, align 4 ; [#uses=2]
6 %temp = alloca i32, align 4 ; [#uses=2]
67 %ctz_x = alloca i32, align 4 ; [#uses=3]
78 %ctz_c = alloca i32, align 4 ; [#uses=2]
89 "alloca point" = bitcast i32 0 to i32 ; [#uses=0]
1415 %tmp4 = call i32 asm "$(cntlz$|cntlzw$) $0,$1", "=r,r,~{dirflag},~{fpsr},~{flags}"( i32 %tmp3 ) ; [#uses=1]
1516 store i32 %tmp4, i32* %ctz_c
1617 %tmp5 = load i32* %ctz_c ; [#uses=1]
17 store i32 %tmp5, i32* %tmp
18 %tmp6 = load i32* %tmp ; [#uses=1]
18 store i32 %tmp5, i32* %temp
19 %tmp6 = load i32* %temp ; [#uses=1]
1920 store i32 %tmp6, i32* %retval
2021 br label %return
2122
2223 return: ; preds = %entry
23 %retval = load i32* %retval ; [#uses=1]
24 ret i32 %retval
24 %retval2 = load i32* %retval ; [#uses=1]
25 ret i32 %retval2
2526 }
1414 %tmp1 = sext i16 %x to i32
1515 %tmp2 = add i32 %tmp, %tmp1
1616 %tmp4 = ashr i32 %tmp2, i8 1
17 %tmp4 = trunc i32 %tmp4 to i16
18 %tmp45 = sext i16 %tmp4 to i32
17 %tmp5 = trunc i32 %tmp4 to i16
18 %tmp45 = sext i16 %tmp5 to i32
1919 %retval = trunc i32 %tmp45 to i16
2020 ret i16 %retval
2121 }
2222
2323 define i16 @test3(i32 zext %X) sext {
2424 %tmp1 = lshr i32 %X, i8 16
25 %tmp1 = trunc i32 %tmp1 to i16
26 ret i16 %tmp1
25 %tmp2 = trunc i32 %tmp1 to i16
26 ret i16 %tmp2
2727 }
2828
1414 %r6 = load i32* %a3
1515 %r8 = load i32* %a4
1616 %r14 = load i32* %a5
17 %r = sext i32 %r2 to i64
17 %rx = sext i32 %r2 to i64
1818 %r9 = sext i32 %r to i64
19 %r11 = add i64 %r, 0
20 %r = icmp slt i64 %r11, 0
21 %r12 = select i1 %r, i64 0, i64 %r11
19 %r11 = add i64 %rx, 0
20 %ras = icmp slt i64 %r11, 0
21 %r12 = select i1 %ras, i64 0, i64 %r11
2222 %r16 = sext i32 %r14 to i64
2323 %r17 = sext i32 %r8 to i64
2424 %r18 = sub i64 %r16, 0
2727 %r19h = add i64 %r18, 0
2828 %r22 = select i1 %r20, i64 1, i64 %r19h
2929 %r23 = mul i64 %r22, 0
30 %r23 = trunc i64 %r23 to i32
31 %r24 = shl i32 %r23, i8 0
30 %r23a = trunc i64 %r23 to i32
31 %r24 = shl i32 %r23a, i8 0
3232 %r25 = add i32 %r24, 0
33 %r = alloca i8, i32 %r25, align 16
34 %r28 = getelementptr i8* %r, i32 0
33 %ras2 = alloca i8, i32 %r25, align 16
34 %r28 = getelementptr i8* %ras2, i32 0
3535 %r38 = shl i64 %r12, i8 0
3636 %s2013 = add i64 %r38, 0
37 %c22012 = getelementptr i8* %r, i64 %s2013
37 %c22012 = getelementptr i8* %ras2, i64 %s2013
3838 %r42 = shl i64 %r12, i8 0
3939 %s2011 = add i64 %r42, 16
40 %c22010 = getelementptr i8* %r, i64 %s2011
40 %c22010 = getelementptr i8* %ras2, i64 %s2011
4141 %r50 = add i64 %r16, 0
4242 %r51 = icmp slt i64 %r50, 0
4343 %r50sh = shl i64 %r50, i8 0
4545 %r54 = select i1 %r51, i64 0, i64 %r50j
4646 %r56 = mul i64 %r54, %r12
4747 %r28s = add i64 %r56, 16
48 %c2 = getelementptr i8* %r, i64 %r28s
48 %c2 = getelementptr i8* %ras2, i64 %r28s
4949 %r60 = sub i32 %r2, %r
5050 %r61 = icmp slt i32 %r60, 0
5151 br i1 %r61, label %a29b, label %b63
111111 br label %a30b294
112112 a30b:
113113 %w = phi i64 [ 0, %b179 ], [ %v, %a30b ]
114 %b = shl i64 %w, i8 0
115 %r283 = add i64 %b, 0
116 %r286 = add i64 %b, 0
114 %b2 = shl i64 %w, i8 0
115 %r283 = add i64 %b2, 0
116 %r286 = add i64 %b2, 0
117117 %r288 = icmp slt i64 %r286, 0
118118 %v = add i64 %w, 0
119119 br i1 %r288, label %b188, label %a30b
203203 %v1853 = add i64 %w1852, 0
204204 br i1 %r708, label %b565, label %a45b
205205 b712:
206 %r795 = add i64 %r, 0
206 %r795 = add i64 %rx, 0
207207 %r799 = add i64 %s923, 0
208208 %r802 = add i64 %w1855, 0
209209 %r807 = icmp slt i64 %r802, 0
254254 %r846 = sext i32 %r60 to i64
255255 %r847 = add i64 %r846, 0
256256 %r851 = load float* bitcast ([128 x i64]* @i6000 to float*)
257 %r856 = sub i64 %r, 0
257 %r856 = sub i64 %rx, 0
258258 br label %b858
259259 b858:
260260 %w1891 = phi i64 [ 0, %b820 ], [ %v1892, %b1016 ]
320320 br i1 %r817, label %a93b, label %b1321
321321 b1086:
322322 %r1089 = sext i32 %r2 to i64
323 %r1090 = add i64 %r, 0
323 %r1090 = add i64 %rx, 0
324324 %r1096 = mul i64 %r9, 0
325325 %r1101 = sext i32 %r8 to i64
326326 %r1104 = add i64 %r1096, 0
423423 %v1959 = add i64 %w1958, 0
424424 br i1 %r1581, label %a74b, label %b1582
425425 b1582:
426 %r1587 = add i64 %r, 0
426 %r1587 = add i64 %rx, 0
427427 %r1591 = add i64 %s1563, 0
428428 %r1596 = add i64 %d1533, 0
429429 %r1601 = icmp slt i64 %r1596, 0
4242 ret int %X
4343 }
4444
45 int %foldSel2(bool %A, int %B, int %C, double %X, double %Y) {
45 int %foldSel2a(bool %A, int %B, int %C, double %X, double %Y) {
4646 %Cond = setlt double %X, %Y
4747 %X = select bool %Cond, int %B, int %C
4848 ret int %X
1111
1212 define i1 @test2(i32 %val, i32 %mask) {
1313 entry:
14 %mask = trunc i32 %mask to i8
15 %shifted = ashr i32 %val, i8 %mask
14 %maski8 = trunc i32 %mask to i8
15 %shifted = ashr i32 %val, i8 %maski8
1616 %anded = and i32 %shifted, 1
1717 %trunced = trunc i32 %anded to i1
1818 br i1 %trunced, label %ret_true, label %ret_false
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps | wc -l | grep 1 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
1 ; RUN: grep shufps | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
3 ; RUN: grep pshufd | wc -l | grep 1
24
35 <4 x float> %test(float %a) {
46 %tmp = insertelement <4 x float> zeroinitializer, float %a, uint 1
79 ret <4 x float> %tmp6
810 }
911
10 <2 x long> %test(int %a) {
12 <2 x long> %test2(int %a) {
1113 %tmp7 = insertelement <4 x int> zeroinitializer, int %a, uint 2
1214 %tmp9 = insertelement <4 x int> %tmp7, int 0, uint 3
1315 %tmp10 = cast <4 x int> %tmp9 to <2 x long>
1010 ret <2 x long> %tmp19
1111 }
1212
13 <2 x long> %test(sbyte %a) {
13 <2 x long> %test2(sbyte %a) {
1414 entry:
1515 %tmp24 = insertelement <16 x sbyte> zeroinitializer, sbyte %a, uint 10
1616 %tmp26 = insertelement <16 x sbyte> %tmp24, sbyte 0, uint 11
1111
1212 define i32 @main(i32 %argc, i8 **%argv) {
1313 %val = trunc i32 %argc to i16
14 %res = call i16 (i16 sext) sext *@test(i16 %val)
15 %two = add i16 %res, %res
16 %res = call i8 @test2(i16 %two zext) zext
14 %res1 = call i16 (i16 sext) sext *@test(i16 %val)
15 %two = add i16 %res1, %res1
16 %res2 = call i8 @test2(i16 %two zext) zext
1717 %retVal = sext i16 %two to i32
1818 ret i32 %retVal
1919 }
1515 ret void
1616 }
1717
18 define i32 @main(i32 %argc, i8** %argc) {
18 define i32 @main(i32 %argc, i8** %argv) {
1919 %i = bitcast i32 0 to i32
2020 call void @multiply(i32 %i, i32 -1, i32 255)
2121 %P = getelementptr [20 x i17]* @ARRAY, i32 0, i32 0
4747 define i32 @"main"()
4848 begin
4949 %Result = call i63 @trampoline(i63 10, i63(i63) *@fib)
50 %Result = trunc i63 %Result to i32
51 ret i32 %Result
50 %Result2 = trunc i63 %Result to i32
51 ret i32 %Result2
5252 end
1313 %val = trunc i33 %argc to i16
1414 %res = call i16 (i16 sext) sext *@test(i16 %val)
1515 %two = add i16 %res, %res
16 %res = call i8 @test2(i16 %two zext) zext
16 %res2 = call i8 @test2(i16 %two zext) zext
1717 %retVal = sext i16 %two to i33
1818 ret i33 %retVal
1919 }
6767 %cast1006 = bitcast %list** %reg119 to i8** ;;
6868 %reg111 = call i8* @malloc(i32 16) ;;
6969 store i8* %reg111, i8** %cast1006 ;;
70 %reg111 = ptrtoint i8* %reg111 to i64
71 %reg1002 = add i64 %reg111, 8
72 %reg1002 = inttoptr i64 %reg1002 to i8* ;;
73 %cast1008 = bitcast i8* %reg1002 to i36* ;;
70 %reg112 = ptrtoint i8* %reg111 to i64
71 %reg1002 = add i64 %reg112, 8
72 %reg1005 = inttoptr i64 %reg1002 to i8* ;;
73 %cast1008 = bitcast i8* %reg1005 to i36* ;;
7474 store i36 %Data, i36* %cast1008 ;;
7575 %cast1003 = inttoptr i64 0 to i64* ;;
7676 %cast1009 = bitcast i8* %reg111 to i64** ;;
0 ; Test linking two functions with different prototypes and two globals
1 ; in different modules.
1 ; in different modules. This is for PR411
22 ; RUN: llvm-as %s -o %t.bar.bc -f
33 ; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \
44 ; RUN: llvm-as -o %t.foo.bc -f
2525 br label %bb
2626
2727 cond_next: ; preds = %bb2
28 %tmp = getelementptr [5 x i8]* @foo, i32 0, i32 %i.0 ; [#uses=1]
29 %tmp = load i8* %tmp ; [#uses=1]
30 %tmp5 = icmp eq i8 %tmp, 0 ; > [#uses=1]
28 %tmp2 = getelementptr [5 x i8]* @foo, i32 0, i32 %i.0 ; > [#uses=1]
29 %tmp3 = load i8* %tmp2 ; [#uses=1]
30 %tmp5 = icmp eq i8 %tmp3, 0 ; [#uses=1]
3131 br i1 %tmp5, label %bb6, label %bb
3232
3333 bb6: ; preds = %cond_next
240240 ret ubyte %C
241241 }
242242
243 int %test34(int %a) { ;; -> -1
243 int %test35(int %a) { ;; -> -1
244244 %tmpnot = xor int %a, -1
245245 %tmp2 = add int %tmpnot, %a
246246 ret int %tmp2
1919 ret uint %B
2020 }
2121
22 bool %test3(int %A) {
22 bool %test3a(int %A) {
2323 %B = rem int %A, -8 ; & 7
2424 %C = setne int %B, 0
2525 ret bool %C
3434 }
3535
3636 define float @test6(<4 x float> %X) {
37 %X = bitcast <4 x float> %X to <4 x i32>
38 %tmp152.i53899.i = shufflevector <4 x i32> %X, <4 x i32> undef, <4 x i32> zeroinitializer
37 %X1 = bitcast <4 x float> %X to <4 x i32>
38 %tmp152.i53899.i = shufflevector <4 x i32> %X1, <4 x i32> undef, <4 x i32> zeroinitializer
3939 %tmp152.i53900.i = bitcast <4 x i32> %tmp152.i53899.i to <4 x float>
4040 %tmp34 = extractelement <4 x float> %tmp152.i53900.i, i32 0
4141 ret float %tmp34