1 ; RUN: llc < %s -march=cellspu > %t1.s
2 ; RUN: grep shufb %t1.s | count 39
3 ; RUN: grep ilhu %t1.s | count 27
4 ; RUN: grep iohl %t1.s | count 27
5 ; RUN: grep lqa %t1.s | count 10
6 ; RUN: grep shlqby %t1.s | count 12
7 ; RUN: grep 515 %t1.s | count 1
8 ; RUN: grep 1029 %t1.s | count 2
9 ; RUN: grep 1543 %t1.s | count 2
10 ; RUN: grep 2057 %t1.s | count 2
11 ; RUN: grep 2571 %t1.s | count 2
12 ; RUN: grep 3085 %t1.s | count 2
13 ; RUN: grep 3599 %t1.s | count 2
14 ; RUN: grep 32768 %t1.s | count 1
15 ; RUN: grep 32769 %t1.s | count 1
16 ; RUN: grep 32770 %t1.s | count 1
17 ; RUN: grep 32771 %t1.s | count 1
18 ; RUN: grep 32772 %t1.s | count 1
19 ; RUN: grep 32773 %t1.s | count 1
20 ; RUN: grep 32774 %t1.s | count 1
21 ; RUN: grep 32775 %t1.s | count 1
22 ; RUN: grep 32776 %t1.s | count 1
23 ; RUN: grep 32777 %t1.s | count 1
24 ; RUN: grep 32778 %t1.s | count 1
25 ; RUN: grep 32779 %t1.s | count 1
26 ; RUN: grep 32780 %t1.s | count 1
27 ; RUN: grep 32781 %t1.s | count 1
28 ; RUN: grep 32782 %t1.s | count 1
29 ; RUN: grep 32783 %t1.s | count 1
30 ; RUN: grep 32896 %t1.s | count 24
32 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
35 define i32 @i32_extract_0(<4 x i32> %v) {
37 %a = extractelement <4 x i32> %v, i32 0
41 define i32 @i32_extract_1(<4 x i32> %v) {
43 %a = extractelement <4 x i32> %v, i32 1
47 define i32 @i32_extract_2(<4 x i32> %v) {
49 %a = extractelement <4 x i32> %v, i32 2
53 define i32 @i32_extract_3(<4 x i32> %v) {
55 %a = extractelement <4 x i32> %v, i32 3
59 define i16 @i16_extract_0(<8 x i16> %v) {
61 %a = extractelement <8 x i16> %v, i32 0
65 define i16 @i16_extract_1(<8 x i16> %v) {
67 %a = extractelement <8 x i16> %v, i32 1
71 define i16 @i16_extract_2(<8 x i16> %v) {
73 %a = extractelement <8 x i16> %v, i32 2
77 define i16 @i16_extract_3(<8 x i16> %v) {
79 %a = extractelement <8 x i16> %v, i32 3
83 define i16 @i16_extract_4(<8 x i16> %v) {
85 %a = extractelement <8 x i16> %v, i32 4
89 define i16 @i16_extract_5(<8 x i16> %v) {
91 %a = extractelement <8 x i16> %v, i32 5
95 define i16 @i16_extract_6(<8 x i16> %v) {
97 %a = extractelement <8 x i16> %v, i32 6
101 define i16 @i16_extract_7(<8 x i16> %v) {
103 %a = extractelement <8 x i16> %v, i32 7
107 define i8 @i8_extract_0(<16 x i8> %v) {
109 %a = extractelement <16 x i8> %v, i32 0
113 define i8 @i8_extract_1(<16 x i8> %v) {
115 %a = extractelement <16 x i8> %v, i32 1
119 define i8 @i8_extract_2(<16 x i8> %v) {
121 %a = extractelement <16 x i8> %v, i32 2
125 define i8 @i8_extract_3(<16 x i8> %v) {
127 %a = extractelement <16 x i8> %v, i32 3
131 define i8 @i8_extract_4(<16 x i8> %v) {
133 %a = extractelement <16 x i8> %v, i32 4
137 define i8 @i8_extract_5(<16 x i8> %v) {
139 %a = extractelement <16 x i8> %v, i32 5
143 define i8 @i8_extract_6(<16 x i8> %v) {
145 %a = extractelement <16 x i8> %v, i32 6
149 define i8 @i8_extract_7(<16 x i8> %v) {
151 %a = extractelement <16 x i8> %v, i32 7
155 define i8 @i8_extract_8(<16 x i8> %v) {
157 %a = extractelement <16 x i8> %v, i32 8
161 define i8 @i8_extract_9(<16 x i8> %v) {
163 %a = extractelement <16 x i8> %v, i32 9
167 define i8 @i8_extract_10(<16 x i8> %v) {
169 %a = extractelement <16 x i8> %v, i32 10
173 define i8 @i8_extract_11(<16 x i8> %v) {
175 %a = extractelement <16 x i8> %v, i32 11
179 define i8 @i8_extract_12(<16 x i8> %v) {
181 %a = extractelement <16 x i8> %v, i32 12
185 define i8 @i8_extract_13(<16 x i8> %v) {
187 %a = extractelement <16 x i8> %v, i32 13
191 define i8 @i8_extract_14(<16 x i8> %v) {
193 %a = extractelement <16 x i8> %v, i32 14
197 define i8 @i8_extract_15(<16 x i8> %v) {
199 %a = extractelement <16 x i8> %v, i32 15
203 ;;--------------------------------------------------------------------------
204 ;; extract element, variable index:
205 ;;--------------------------------------------------------------------------
207 define i8 @extract_varadic_i8(i32 %i) nounwind readnone {
209 %0 = extractelement <16 x i8> < i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, i32 %i
213 define i8 @extract_varadic_i8_1(<16 x i8> %v, i32 %i) nounwind readnone {
215 %0 = extractelement <16 x i8> %v, i32 %i
219 define i16 @extract_varadic_i16(i32 %i) nounwind readnone {
221 %0 = extractelement <8 x i16> < i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, i32 %i
225 define i16 @extract_varadic_i16_1(<8 x i16> %v, i32 %i) nounwind readnone {
227 %0 = extractelement <8 x i16> %v, i32 %i
231 define i32 @extract_varadic_i32(i32 %i) nounwind readnone {
233 %0 = extractelement <4 x i32> < i32 0, i32 1, i32 2, i32 3>, i32 %i
237 define i32 @extract_varadic_i32_1(<4 x i32> %v, i32 %i) nounwind readnone {
239 %0 = extractelement <4 x i32> %v, i32 %i
243 define float @extract_varadic_f32(i32 %i) nounwind readnone {
245 %0 = extractelement <4 x float> < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 >, i32 %i
249 define float @extract_varadic_f32_1(<4 x float> %v, i32 %i) nounwind readnone {
251 %0 = extractelement <4 x float> %v, i32 %i
255 define i64 @extract_varadic_i64(i32 %i) nounwind readnone {
257 %0 = extractelement <2 x i64> < i64 0, i64 1>, i32 %i
261 define i64 @extract_varadic_i64_1(<2 x i64> %v, i32 %i) nounwind readnone {
263 %0 = extractelement <2 x i64> %v, i32 %i
267 define double @extract_varadic_f64(i32 %i) nounwind readnone {
269 %0 = extractelement <2 x double> < double 1.000000e+00, double 2.000000e+00>, i32 %i
273 define double @extract_varadic_f64_1(<2 x double> %v, i32 %i) nounwind readnone {
275 %0 = extractelement <2 x double> %v, i32 %i