1af67e8d635cbfa7bdc7dd8b64300dfd713bbf38
[oota-llvm.git] / test / CodeGen / ARM / vceq.ll
1 ; RUN: llvm-as < %s | llc -march=arm -mattr=+neon > %t
2 ; RUN: grep {vceq\\.i8} %t | count 2
3 ; RUN: grep {vceq\\.i16} %t | count 2
4 ; RUN: grep {vceq\\.i32} %t | count 2
5 ; RUN: grep {vceq\\.f32} %t | count 2
6
7 define <8 x i8> @vceqi8(<8 x i8>* %A, <8 x i8>* %B) nounwind {
8         %tmp1 = load <8 x i8>* %A
9         %tmp2 = load <8 x i8>* %B
10         %tmp3 = icmp eq <8 x i8> %tmp1, %tmp2
11         %tmp4 = sext <8 x i1> %tmp3 to <8 x i8>
12         ret <8 x i8> %tmp4
13 }
14
15 define <4 x i16> @vceqi16(<4 x i16>* %A, <4 x i16>* %B) nounwind {
16         %tmp1 = load <4 x i16>* %A
17         %tmp2 = load <4 x i16>* %B
18         %tmp3 = icmp eq <4 x i16> %tmp1, %tmp2
19         %tmp4 = sext <4 x i1> %tmp3 to <4 x i16>
20         ret <4 x i16> %tmp4
21 }
22
23 define <2 x i32> @vceqi32(<2 x i32>* %A, <2 x i32>* %B) nounwind {
24         %tmp1 = load <2 x i32>* %A
25         %tmp2 = load <2 x i32>* %B
26         %tmp3 = icmp eq <2 x i32> %tmp1, %tmp2
27         %tmp4 = sext <2 x i1> %tmp3 to <2 x i32>
28         ret <2 x i32> %tmp4
29 }
30
31 define <2 x i32> @vceqf32(<2 x float>* %A, <2 x float>* %B) nounwind {
32         %tmp1 = load <2 x float>* %A
33         %tmp2 = load <2 x float>* %B
34         %tmp3 = fcmp oeq <2 x float> %tmp1, %tmp2
35         %tmp4 = sext <2 x i1> %tmp3 to <2 x i32>
36         ret <2 x i32> %tmp4
37 }
38
39 define <16 x i8> @vceqQi8(<16 x i8>* %A, <16 x i8>* %B) nounwind {
40         %tmp1 = load <16 x i8>* %A
41         %tmp2 = load <16 x i8>* %B
42         %tmp3 = icmp eq <16 x i8> %tmp1, %tmp2
43         %tmp4 = sext <16 x i1> %tmp3 to <16 x i8>
44         ret <16 x i8> %tmp4
45 }
46
47 define <8 x i16> @vceqQi16(<8 x i16>* %A, <8 x i16>* %B) nounwind {
48         %tmp1 = load <8 x i16>* %A
49         %tmp2 = load <8 x i16>* %B
50         %tmp3 = icmp eq <8 x i16> %tmp1, %tmp2
51         %tmp4 = sext <8 x i1> %tmp3 to <8 x i16>
52         ret <8 x i16> %tmp4
53 }
54
55 define <4 x i32> @vceqQi32(<4 x i32>* %A, <4 x i32>* %B) nounwind {
56         %tmp1 = load <4 x i32>* %A
57         %tmp2 = load <4 x i32>* %B
58         %tmp3 = icmp eq <4 x i32> %tmp1, %tmp2
59         %tmp4 = sext <4 x i1> %tmp3 to <4 x i32>
60         ret <4 x i32> %tmp4
61 }
62
63 define <4 x i32> @vceqQf32(<4 x float>* %A, <4 x float>* %B) nounwind {
64         %tmp1 = load <4 x float>* %A
65         %tmp2 = load <4 x float>* %B
66         %tmp3 = fcmp oeq <4 x float> %tmp1, %tmp2
67         %tmp4 = sext <4 x i1> %tmp3 to <4 x i32>
68         ret <4 x i32> %tmp4
69 }