1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon > %t
2 ; RUN: grep {vmov\\.s8} %t | count 2
3 ; RUN: grep {vmov\\.s16} %t | count 2
4 ; RUN: grep {vmov\\.u8} %t | count 2
5 ; RUN: grep {vmov\\.u16} %t | count 2
6 ; RUN: grep {vmov\\.32} %t | count 2
8 define i32 @vget_lanes8(<8 x i8>* %A) nounwind {
9 %tmp1 = load <8 x i8>* %A
10 %tmp2 = extractelement <8 x i8> %tmp1, i32 1
11 %tmp3 = sext i8 %tmp2 to i32
15 define i32 @vget_lanes16(<4 x i16>* %A) nounwind {
16 %tmp1 = load <4 x i16>* %A
17 %tmp2 = extractelement <4 x i16> %tmp1, i32 1
18 %tmp3 = sext i16 %tmp2 to i32
22 define i32 @vget_laneu8(<8 x i8>* %A) nounwind {
23 %tmp1 = load <8 x i8>* %A
24 %tmp2 = extractelement <8 x i8> %tmp1, i32 1
25 %tmp3 = zext i8 %tmp2 to i32
29 define i32 @vget_laneu16(<4 x i16>* %A) nounwind {
30 %tmp1 = load <4 x i16>* %A
31 %tmp2 = extractelement <4 x i16> %tmp1, i32 1
32 %tmp3 = zext i16 %tmp2 to i32
36 ; Do a vector add to keep the extraction from being done directly from memory.
37 define i32 @vget_lanei32(<2 x i32>* %A) nounwind {
38 %tmp1 = load <2 x i32>* %A
39 %tmp2 = add <2 x i32> %tmp1, %tmp1
40 %tmp3 = extractelement <2 x i32> %tmp2, i32 1
44 define i32 @vgetQ_lanes8(<16 x i8>* %A) nounwind {
45 %tmp1 = load <16 x i8>* %A
46 %tmp2 = extractelement <16 x i8> %tmp1, i32 1
47 %tmp3 = sext i8 %tmp2 to i32
51 define i32 @vgetQ_lanes16(<8 x i16>* %A) nounwind {
52 %tmp1 = load <8 x i16>* %A
53 %tmp2 = extractelement <8 x i16> %tmp1, i32 1
54 %tmp3 = sext i16 %tmp2 to i32
58 define i32 @vgetQ_laneu8(<16 x i8>* %A) nounwind {
59 %tmp1 = load <16 x i8>* %A
60 %tmp2 = extractelement <16 x i8> %tmp1, i32 1
61 %tmp3 = zext i8 %tmp2 to i32
65 define i32 @vgetQ_laneu16(<8 x i16>* %A) nounwind {
66 %tmp1 = load <8 x i16>* %A
67 %tmp2 = extractelement <8 x i16> %tmp1, i32 1
68 %tmp3 = zext i16 %tmp2 to i32
72 ; Do a vector add to keep the extraction from being done directly from memory.
73 define i32 @vgetQ_lanei32(<4 x i32>* %A) nounwind {
74 %tmp1 = load <4 x i32>* %A
75 %tmp2 = add <4 x i32> %tmp1, %tmp1
76 %tmp3 = extractelement <4 x i32> %tmp2, i32 1