blob: 313260a2d6873738298b3353626d393981087ed7 [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
Bob Wilsone60fee02009-06-22 23:27:02 +00002
3define <8 x i8> @vduplane8(<8 x i8>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +00004;CHECK: vduplane8:
5;CHECK: vdup.8
Bob Wilsone60fee02009-06-22 23:27:02 +00006 %tmp1 = load <8 x i8>* %A
7 %tmp2 = shufflevector <8 x i8> %tmp1, <8 x i8> undef, <8 x i32> < i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1 >
8 ret <8 x i8> %tmp2
9}
10
11define <4 x i16> @vduplane16(<4 x i16>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000012;CHECK: vduplane16:
13;CHECK: vdup.16
Bob Wilsone60fee02009-06-22 23:27:02 +000014 %tmp1 = load <4 x i16>* %A
15 %tmp2 = shufflevector <4 x i16> %tmp1, <4 x i16> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 >
16 ret <4 x i16> %tmp2
17}
18
19define <2 x i32> @vduplane32(<2 x i32>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000020;CHECK: vduplane32:
21;CHECK: vdup.32
Bob Wilsone60fee02009-06-22 23:27:02 +000022 %tmp1 = load <2 x i32>* %A
23 %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> undef, <2 x i32> < i32 1, i32 1 >
24 ret <2 x i32> %tmp2
25}
26
27define <2 x float> @vduplanefloat(<2 x float>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000028;CHECK: vduplanefloat:
29;CHECK: vdup.32
Bob Wilsone60fee02009-06-22 23:27:02 +000030 %tmp1 = load <2 x float>* %A
31 %tmp2 = shufflevector <2 x float> %tmp1, <2 x float> undef, <2 x i32> < i32 1, i32 1 >
32 ret <2 x float> %tmp2
33}
34
35define <16 x i8> @vduplaneQ8(<8 x i8>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000036;CHECK: vduplaneQ8:
37;CHECK: vdup.8
Bob Wilsone60fee02009-06-22 23:27:02 +000038 %tmp1 = load <8 x i8>* %A
39 %tmp2 = shufflevector <8 x i8> %tmp1, <8 x i8> undef, <16 x i32> < i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1 >
40 ret <16 x i8> %tmp2
41}
42
43define <8 x i16> @vduplaneQ16(<4 x i16>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000044;CHECK: vduplaneQ16:
45;CHECK: vdup.16
Bob Wilsone60fee02009-06-22 23:27:02 +000046 %tmp1 = load <4 x i16>* %A
47 %tmp2 = shufflevector <4 x i16> %tmp1, <4 x i16> undef, <8 x i32> < i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1 >
48 ret <8 x i16> %tmp2
49}
50
51define <4 x i32> @vduplaneQ32(<2 x i32>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000052;CHECK: vduplaneQ32:
53;CHECK: vdup.32
Bob Wilsone60fee02009-06-22 23:27:02 +000054 %tmp1 = load <2 x i32>* %A
55 %tmp2 = shufflevector <2 x i32> %tmp1, <2 x i32> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 >
56 ret <4 x i32> %tmp2
57}
58
59define <4 x float> @vduplaneQfloat(<2 x float>* %A) nounwind {
Bob Wilson5d7babb2009-09-04 04:07:19 +000060;CHECK: vduplaneQfloat:
61;CHECK: vdup.32
Bob Wilsone60fee02009-06-22 23:27:02 +000062 %tmp1 = load <2 x float>* %A
63 %tmp2 = shufflevector <2 x float> %tmp1, <2 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 >
64 ret <4 x float> %tmp2
65}
Anton Korobeynikovb261a192009-09-02 21:21:28 +000066
67define arm_apcscc <2 x i64> @foo(<2 x i64> %arg0_int64x1_t) nounwind readnone {
68entry:
69 %0 = shufflevector <2 x i64> %arg0_int64x1_t, <2 x i64> undef, <2 x i32> <i32 1, i32 1>
70 ret <2 x i64> %0
71}
72
73define arm_apcscc <2 x i64> @bar(<2 x i64> %arg0_int64x1_t) nounwind readnone {
74entry:
75 %0 = shufflevector <2 x i64> %arg0_int64x1_t, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
76 ret <2 x i64> %0
77}
78
79define arm_apcscc <2 x double> @baz(<2 x double> %arg0_int64x1_t) nounwind readnone {
80entry:
81 %0 = shufflevector <2 x double> %arg0_int64x1_t, <2 x double> undef, <2 x i32> <i32 1, i32 1>
82 ret <2 x double> %0
83}
84
85define arm_apcscc <2 x double> @qux(<2 x double> %arg0_int64x1_t) nounwind readnone {
86entry:
87 %0 = shufflevector <2 x double> %arg0_int64x1_t, <2 x double> undef, <2 x i32> <i32 0, i32 0>
88 ret <2 x double> %0
Bob Wilson5d7babb2009-09-04 04:07:19 +000089}