llvm.org GIT mirror llvm / 33f9cce
A few instruction scheduling test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28077 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
3 changed file(s) with 117 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -stats 2>&1 | not grep 'Number of register spills'
1
2 int %foo(<4 x float>* %a, <4 x float>* %b, <4 x float>* %c, <4 x float>* %d) {
3 %tmp44 = load <4 x float>* %a ; <<4 x float>> [#uses=9]
4 %tmp46 = load <4 x float>* %b ; <<4 x float>> [#uses=1]
5 %tmp48 = load <4 x float>* %c ; <<4 x float>> [#uses=1]
6 %tmp50 = load <4 x float>* %d ; <<4 x float>> [#uses=1]
7 %tmp51 = cast <4 x float> %tmp44 to <4 x int> ; <<4 x int>> [#uses=1]
8 %tmp = shufflevector <4 x int> %tmp51, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 > ; <<4 x int>> [#uses=2]
9 %tmp52 = cast <4 x int> %tmp to <4 x float> ; <<4 x float>> [#uses=1]
10 %tmp60 = xor <4 x int> %tmp, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 > ; <<4 x int>> [#uses=1]
11 %tmp61 = cast <4 x int> %tmp60 to <4 x float> ; <<4 x float>> [#uses=1]
12 %tmp74 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp52, <4 x float> %tmp44, sbyte 1 ) ; <<4 x float>> [#uses=1]
13 %tmp75 = cast <4 x float> %tmp74 to <4 x int> ; <<4 x int>> [#uses=1]
14 %tmp88 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp61, sbyte 1 ) ; <<4 x float>> [#uses=1]
15 %tmp89 = cast <4 x float> %tmp88 to <4 x int> ; <<4 x int>> [#uses=1]
16 %tmp98 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp75, <4 x int> %tmp89 ) ; <<4 x int>> [#uses=1]
17 %tmp102 = cast <4 x int> %tmp98 to <8 x short> ; <<8 x short>> [#uses=1]
18 %tmp = shufflevector <8 x short> %tmp102, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 > ; <<8 x short>> [#uses=1]
19 %tmp105 = shufflevector <8 x short> %tmp, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 > ; <<8 x short>> [#uses=1]
20 %tmp105 = cast <8 x short> %tmp105 to <4 x float> ; <<4 x float>> [#uses=1]
21 store <4 x float> %tmp105, <4 x float>* %a
22 %tmp108 = cast <4 x float> %tmp46 to <4 x int> ; <<4 x int>> [#uses=1]
23 %tmp109 = shufflevector <4 x int> %tmp108, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 > ; <<4 x int>> [#uses=2]
24 %tmp109 = cast <4 x int> %tmp109 to <4 x float> ; <<4 x float>> [#uses=1]
25 %tmp119 = xor <4 x int> %tmp109, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 > ; <<4 x int>> [#uses=1]
26 %tmp120 = cast <4 x int> %tmp119 to <4 x float> ; <<4 x float>> [#uses=1]
27 %tmp133 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp109, <4 x float> %tmp44, sbyte 1 ) ; <<4 x float>> [#uses=1]
28 %tmp134 = cast <4 x float> %tmp133 to <4 x int> ; <<4 x int>> [#uses=1]
29 %tmp147 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp120, sbyte 1 ) ; <<4 x float>> [#uses=1]
30 %tmp148 = cast <4 x float> %tmp147 to <4 x int> ; <<4 x int>> [#uses=1]
31 %tmp159 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp134, <4 x int> %tmp148 ) ; <<4 x int>> [#uses=1]
32 %tmp163 = cast <4 x int> %tmp159 to <8 x short> ; <<8 x short>> [#uses=1]
33 %tmp164 = shufflevector <8 x short> %tmp163, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 > ; <<8 x short>> [#uses=1]
34 %tmp166 = shufflevector <8 x short> %tmp164, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 > ; <<8 x short>> [#uses=1]
35 %tmp166 = cast <8 x short> %tmp166 to <4 x float> ; <<4 x float>> [#uses=1]
36 store <4 x float> %tmp166, <4 x float>* %b
37 %tmp169 = cast <4 x float> %tmp48 to <4 x int> ; <<4 x int>> [#uses=1]
38 %tmp170 = shufflevector <4 x int> %tmp169, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 > ; <<4 x int>> [#uses=2]
39 %tmp170 = cast <4 x int> %tmp170 to <4 x float> ; <<4 x float>> [#uses=1]
40 %tmp180 = xor <4 x int> %tmp170, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 > ; <<4 x int>> [#uses=1]
41 %tmp181 = cast <4 x int> %tmp180 to <4 x float> ; <<4 x float>> [#uses=1]
42 %tmp194 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp170, <4 x float> %tmp44, sbyte 1 ) ; <<4 x float>> [#uses=1]
43 %tmp195 = cast <4 x float> %tmp194 to <4 x int> ; <<4 x int>> [#uses=1]
44 %tmp208 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp181, sbyte 1 ) ; <<4 x float>> [#uses=1]
45 %tmp209 = cast <4 x float> %tmp208 to <4 x int> ; <<4 x int>> [#uses=1]
46 %tmp220 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp195, <4 x int> %tmp209 ) ; <<4 x int>> [#uses=1]
47 %tmp224 = cast <4 x int> %tmp220 to <8 x short> ; <<8 x short>> [#uses=1]
48 %tmp225 = shufflevector <8 x short> %tmp224, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 > ; <<8 x short>> [#uses=1]
49 %tmp227 = shufflevector <8 x short> %tmp225, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 > ; <<8 x short>> [#uses=1]
50 %tmp227 = cast <8 x short> %tmp227 to <4 x float> ; <<4 x float>> [#uses=1]
51 store <4 x float> %tmp227, <4 x float>* %c
52 %tmp230 = cast <4 x float> %tmp50 to <4 x int> ; <<4 x int>> [#uses=1]
53 %tmp231 = shufflevector <4 x int> %tmp230, <4 x int> undef, <4 x uint> < uint 3, uint 3, uint 3, uint 3 > ; <<4 x int>> [#uses=2]
54 %tmp231 = cast <4 x int> %tmp231 to <4 x float> ; <<4 x float>> [#uses=1]
55 %tmp241 = xor <4 x int> %tmp231, < int -2147483648, int -2147483648, int -2147483648, int -2147483648 > ; <<4 x int>> [#uses=1]
56 %tmp242 = cast <4 x int> %tmp241 to <4 x float> ; <<4 x float>> [#uses=1]
57 %tmp255 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp231, <4 x float> %tmp44, sbyte 1 ) ; <<4 x float>> [#uses=1]
58 %tmp256 = cast <4 x float> %tmp255 to <4 x int> ; <<4 x int>> [#uses=1]
59 %tmp269 = tail call <4 x float> %llvm.x86.sse.cmp.ps( <4 x float> %tmp44, <4 x float> %tmp242, sbyte 1 ) ; <<4 x float>> [#uses=1]
60 %tmp270 = cast <4 x float> %tmp269 to <4 x int> ; <<4 x int>> [#uses=1]
61 %tmp281 = tail call <4 x int> %llvm.x86.sse2.packssdw.128( <4 x int> %tmp256, <4 x int> %tmp270 ) ; <<4 x int>> [#uses=1]
62 %tmp285 = cast <4 x int> %tmp281 to <8 x short> ; <<8 x short>> [#uses=1]
63 %tmp286 = shufflevector <8 x short> %tmp285, <8 x short> undef, <8 x uint> < uint 0, uint 1, uint 2, uint 3, uint 6, uint 5, uint 4, uint 7 > ; <<8 x short>> [#uses=1]
64 %tmp288 = shufflevector <8 x short> %tmp286, <8 x short> undef, <8 x uint> < uint 2, uint 1, uint 0, uint 3, uint 4, uint 5, uint 6, uint 7 > ; <<8 x short>> [#uses=1]
65 %tmp288 = cast <8 x short> %tmp288 to <4 x float> ; <<4 x float>> [#uses=1]
66 store <4 x float> %tmp288, <4 x float>* %d
67 ret int 0
68 }
69
70 declare <4 x float> %llvm.x86.sse.cmp.ps(<4 x float>, <4 x float>, sbyte)
71
72 declare <4 x int> %llvm.x86.sse2.packssdw.128(<4 x int>, <4 x int>)
0 ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=static -stats 2>&1 | grep "asm-printer" | grep 14
1 %size20 = external global uint ; [#uses=1]
2 %in5 = external global ubyte* ; [#uses=1]
3
4 int %compare(sbyte* %a, sbyte* %b) {
5 %tmp = cast sbyte* %a to uint* ; [#uses=1]
6 %tmp1 = cast sbyte* %b to uint* ; [#uses=1]
7 %tmp = load uint* %size20 ; [#uses=1]
8 %tmp = load ubyte** %in5 ; [#uses=2]
9 %tmp3 = load uint* %tmp1 ; [#uses=1]
10 %tmp4 = getelementptr ubyte* %tmp, uint %tmp3 ; [#uses=1]
11 %tmp7 = load uint* %tmp ; [#uses=1]
12 %tmp8 = getelementptr ubyte* %tmp, uint %tmp7 ; [#uses=1]
13 %tmp8 = cast ubyte* %tmp8 to sbyte* ; [#uses=1]
14 %tmp4 = cast ubyte* %tmp4 to sbyte* ; [#uses=1]
15 %tmp = tail call int %memcmp( sbyte* %tmp8, sbyte* %tmp4, uint %tmp ) ; [#uses=1]
16 ret int %tmp
17 }
18
19 declare int %memcmp(sbyte*, sbyte*, uint)
0 ; RUN: llvm-as < %s | llc -march=x86 -stats 2>&1 | grep "asm-printer" | grep 19
1
2 void %_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(sbyte* %tmp435.i, uint* %tmp449.i.out) {
3 newFuncRoot:
4 br label %cond_true456.i
5
6 bb459.i.exitStub: ; preds = %cond_true456.i
7 store uint %tmp449.i, uint* %tmp449.i.out
8 ret void
9
10 cond_true456.i: ; preds = %cond_true456.i, %newFuncRoot
11 %__s441.2.4.i = phi sbyte* [ %tmp451.i, %cond_true456.i ], [ %tmp435.i, %newFuncRoot ] ; [#uses=2]
12 %__h.2.4.i = phi uint [ %tmp449.i, %cond_true456.i ], [ 0, %newFuncRoot ] ; [#uses=1]
13 %tmp446.i = mul uint %__h.2.4.i, 5 ; [#uses=1]
14 %tmp.i = load sbyte* %__s441.2.4.i ; [#uses=1]
15 %tmp448.i = cast sbyte %tmp.i to uint ; [#uses=1]
16 %tmp449.i = add uint %tmp448.i, %tmp446.i ; [#uses=2]
17 %tmp450.i = cast sbyte* %__s441.2.4.i to uint ; [#uses=1]
18 %tmp451.i = add uint %tmp450.i, 1 ; [#uses=1]
19 %tmp451.i = cast uint %tmp451.i to sbyte* ; [#uses=2]
20 %tmp45435.i = load sbyte* %tmp451.i ; [#uses=1]
21 %tmp45536.i = seteq sbyte %tmp45435.i, 0 ; [#uses=1]
22 br bool %tmp45536.i, label %bb459.i.exitStub, label %cond_true456.i
23 }