Dan Gohman | da594cf | 2009-09-09 00:09:15 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2 | |
| 3 | define <8 x i8> @vduplane8(<8 x i8>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 4 | ;CHECK: vduplane8: |
| 5 | ;CHECK: vdup.8 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 6 | %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 | |
| 11 | define <4 x i16> @vduplane16(<4 x i16>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 12 | ;CHECK: vduplane16: |
| 13 | ;CHECK: vdup.16 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 14 | %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 | |
| 19 | define <2 x i32> @vduplane32(<2 x i32>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 20 | ;CHECK: vduplane32: |
| 21 | ;CHECK: vdup.32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 22 | %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 | |
| 27 | define <2 x float> @vduplanefloat(<2 x float>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 28 | ;CHECK: vduplanefloat: |
| 29 | ;CHECK: vdup.32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 30 | %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 | |
| 35 | define <16 x i8> @vduplaneQ8(<8 x i8>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 36 | ;CHECK: vduplaneQ8: |
| 37 | ;CHECK: vdup.8 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 38 | %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 | |
| 43 | define <8 x i16> @vduplaneQ16(<4 x i16>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 44 | ;CHECK: vduplaneQ16: |
| 45 | ;CHECK: vdup.16 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 46 | %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 | |
| 51 | define <4 x i32> @vduplaneQ32(<2 x i32>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 52 | ;CHECK: vduplaneQ32: |
| 53 | ;CHECK: vdup.32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 54 | %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 | |
| 59 | define <4 x float> @vduplaneQfloat(<2 x float>* %A) nounwind { |
Bob Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 60 | ;CHECK: vduplaneQfloat: |
| 61 | ;CHECK: vdup.32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 62 | %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 Korobeynikov | b261a19 | 2009-09-02 21:21:28 +0000 | [diff] [blame] | 66 | |
| 67 | define arm_apcscc <2 x i64> @foo(<2 x i64> %arg0_int64x1_t) nounwind readnone { |
| 68 | entry: |
| 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 | |
| 73 | define arm_apcscc <2 x i64> @bar(<2 x i64> %arg0_int64x1_t) nounwind readnone { |
| 74 | entry: |
| 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 | |
| 79 | define arm_apcscc <2 x double> @baz(<2 x double> %arg0_int64x1_t) nounwind readnone { |
| 80 | entry: |
| 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 | |
| 85 | define arm_apcscc <2 x double> @qux(<2 x double> %arg0_int64x1_t) nounwind readnone { |
| 86 | entry: |
| 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 Wilson | 5d7babb | 2009-09-04 04:07:19 +0000 | [diff] [blame] | 89 | } |