llvm.org GIT mirror llvm / d05b67d
Run llvm-upgrade on this test and/or upgrade intrinsic function calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32133 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
18 changed file(s) with 71 addition(s) and 71 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade < %s | llvm-as -o - | llc
11
2 ; This causes the backend to assert out with:
2 ; This caused the backend to assert out with:
33 ; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
44 ;
55 implementation
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;; Date: May 28, 2003.
33 ;; From: test/Programs/External/SPEC/CINT2000/254.gap.llvm.bc
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;; Date: May 28, 2003.
33 ;; From: test/Programs/SingleSource/richards_benchmark.c
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22
33 %.str_1 = internal constant [42 x sbyte] c" ui = %u (0x%x)\09\09UL-ui = %lld (0x%llx)\0A\00"
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;; Date: Jul 8, 2003.
33 ;; From: test/Programs/MultiSource/Olden-perimeter
11 ; Test that llvm.memcpy works with a i64 length operand on all targets.
22
33
4 declare void %llvm.memcpy(sbyte*, sbyte*, ulong, uint)
4 declare void %llvm.memcpy.i64(sbyte*, sbyte*, ulong, uint)
55
66 void %l12_l94_bc_divide_endif_2E_3_2E_ce() {
77 newFuncRoot:
8 tail call void %llvm.memcpy( sbyte* null, sbyte* null, ulong 0, uint 1 )
8 tail call void %llvm.memcpy.i64( sbyte* null, sbyte* null, ulong 0, uint 1 )
99 unreachable
1010 }
None ; RUN: llvm-as -f %s -o - | llc -sched=none &&
1 ; RUN: llvm-as -f %s -o - | llc -sched=default &&
2 ; RUN: llvm-as -f %s -o - | llc -sched=simple &&
3 ; RUN: llvm-as -f %s -o - | llc -sched=simple-noitin &&
4 ; RUN: llvm-as -f %s -o - | llc -sched=list-td &&
5 ; RUN: llvm-as -f %s -o - | llc -sched=list-tdrr &&
6 ; RUN: llvm-as -f %s -o - | llc -sched=list-burr
0 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=none &&
1 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=default &&
2 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple &&
3 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=simple-noitin &&
4 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-td &&
5 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-tdrr &&
6 ; RUN: llvm-upgrade %s | llvm-as | llc -sched=list-burr
77 ; PR859
88
99 implementation
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;; Register allocation is doing a very poor job on this routine from yyparse
33 ;; in Burg:
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;; GetMemInstArgs() folded the two getElementPtr instructions together,
33 ;; producing an illegal getElementPtr. That's because the type generated
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ; Test that a sequence of constant indices are folded correctly
33 ; into the equivalent offset at compile-time.
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ;;
33 ;; Test the sequence:
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 ;; SQRT
3 declare float %llvm.sqrt(float)
4 declare double %llvm.sqrt(double)
3 declare float %llvm.sqrt.f32(float)
4 declare double %llvm.sqrt.f64(double)
55 double %test_sqrt(float %F) {
6 %G = call float %llvm.sqrt(float %F)
6 %G = call float %llvm.sqrt.f32(float %F)
77 %H = cast float %G to double
8 %I = call double %llvm.sqrt(double %H)
8 %I = call double %llvm.sqrt.f64(double %H)
99 ret double %I
1010 }
1111
11 ; XFAIL: ia64|sparcv8
22
33
4 declare bool %llvm.isunordered(double, double)
4 declare bool %llvm.isunordered.f64(double, double)
55
66 bool %test(double %X, double %Y) {
7 %tmp27 = call bool %llvm.isunordered( double %X, double %Y)
7 %tmp27 = call bool %llvm.isunordered.f64( double %X, double %Y)
88 ret bool %tmp27
99 }
0 ; Make sure this testcase is supported by all code generators
11 ; RUN: llvm-upgrade < %s | llvm-as | llc
22
3 declare long %llvm.ctpop(long)
4 declare int %llvm.ctpop(int)
5 declare short %llvm.ctpop(short)
6 declare sbyte %llvm.ctpop(sbyte)
3 declare ulong %llvm.ctpop.i64(ulong)
4 declare uint %llvm.ctpop.i32(uint)
5 declare ushort %llvm.ctpop.i16(ushort)
6 declare ubyte %llvm.ctpop.i8(ubyte)
77
8 void %ctpoptest(sbyte %A, short %B, int %C, long %D,
9 sbyte *%AP, short* %BP, int* %CP, long* %DP) {
10 %a = call sbyte %llvm.ctpop(sbyte %A)
11 %b = call short %llvm.ctpop(short %B)
12 %c = call int %llvm.ctpop(int %C)
13 %d = call long %llvm.ctpop(long %D)
8 void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D,
9 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
10 %a = call ubyte %llvm.ctpop.i8(ubyte %A)
11 %b = call ushort %llvm.ctpop.i16(ushort %B)
12 %c = call uint %llvm.ctpop.i32(uint %C)
13 %d = call ulong %llvm.ctpop.i64(ulong %D)
1414
15 store sbyte %a, sbyte* %AP
16 store short %b, short* %BP
17 store int %c, int* %CP
18 store long %d, long* %DP
15 store ubyte %a, ubyte* %AP
16 store ushort %b, ushort* %BP
17 store uint %c, uint* %CP
18 store ulong %d, ulong* %DP
1919 ret void
2020 }
2121
22 declare long %llvm.ctlz(long)
23 declare int %llvm.ctlz(int)
24 declare short %llvm.ctlz(short)
25 declare sbyte %llvm.ctlz(sbyte)
22 declare ulong %llvm.ctlz.i64(ulong)
23 declare uint %llvm.ctlz.i32(uint)
24 declare ushort %llvm.ctlz.i16(ushort)
25 declare ubyte %llvm.ctlz.i8(ubyte)
2626
27 void %ctlztest(sbyte %A, short %B, int %C, long %D,
28 sbyte *%AP, short* %BP, int* %CP, long* %DP) {
29 %a = call sbyte %llvm.ctlz(sbyte %A)
30 %b = call short %llvm.ctlz(short %B)
31 %c = call int %llvm.ctlz(int %C)
32 %d = call long %llvm.ctlz(long %D)
27 void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D,
28 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
29 %a = call ubyte %llvm.ctlz.i8(ubyte %A)
30 %b = call ushort %llvm.ctlz.i16(ushort %B)
31 %c = call uint %llvm.ctlz.i32(uint %C)
32 %d = call ulong %llvm.ctlz.i64(ulong %D)
3333
34 store sbyte %a, sbyte* %AP
35 store short %b, short* %BP
36 store int %c, int* %CP
37 store long %d, long* %DP
34 store ubyte %a, ubyte* %AP
35 store ushort %b, ushort* %BP
36 store uint %c, uint* %CP
37 store ulong %d, ulong* %DP
3838 ret void
3939 }
4040
41 declare long %llvm.cttz(long)
42 declare int %llvm.cttz(int)
43 declare short %llvm.cttz(short)
44 declare sbyte %llvm.cttz(sbyte)
41 declare ulong %llvm.cttz.i64(ulong)
42 declare uint %llvm.cttz.i32(uint)
43 declare ushort %llvm.cttz.i16(ushort)
44 declare ubyte %llvm.cttz.i8(ubyte)
4545
46 void %cttztest(sbyte %A, short %B, int %C, long %D,
47 sbyte *%AP, short* %BP, int* %CP, long* %DP) {
48 %a = call sbyte %llvm.cttz(sbyte %A)
49 %b = call short %llvm.cttz(short %B)
50 %c = call int %llvm.cttz(int %C)
51 %d = call long %llvm.cttz(long %D)
46 void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D,
47 ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) {
48 %a = call ubyte %llvm.cttz.i8(ubyte %A)
49 %b = call ushort %llvm.cttz.i16(ushort %B)
50 %c = call uint %llvm.cttz.i32(uint %C)
51 %d = call ulong %llvm.cttz.i64(ulong %D)
5252
53 store sbyte %a, sbyte* %AP
54 store short %b, short* %BP
55 store int %c, int* %CP
56 store long %d, long* %DP
53 store ubyte %a, ubyte* %AP
54 store ushort %b, ushort* %BP
55 store uint %c, uint* %CP
56 store ulong %d, ulong* %DP
5757 ret void
5858 }
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ; Test that a negative constant smaller than 64 bits (e.g., int)
33 ; is correctly implemented with sign-extension.
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 implementation
33 declare int "printf"(sbyte*, int, float)
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 %AConst = constant int 123
33
None ; RUN: llvm-as -f %s -o - | llc
0 ; RUN: llvm-upgrade %s | llvm-as | llc
11
22 ; July 6, 2002 -- LLC Regression test
33 ; This test case checks if the integer CC register %xcc (or %ccr)