1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
3 // RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
8 // CHECK-LABEL: test_vdups_lane_f32
9 float32_t test_vdups_lane_f32(float32x2_t a) {
10 return vdups_lane_f32(a, 1);
12 // CHECK-NOT: dup {{s[0-9]+}}, {{v[0-9]+}}.s[1]
16 // CHECK-LABEL: test_vdupd_lane_f64
17 float64_t test_vdupd_lane_f64(float64x1_t a) {
18 return vdupd_lane_f64(a, 0);
20 // CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
24 // CHECK-LABEL: test_vdups_laneq_f32
25 float32_t test_vdups_laneq_f32(float32x4_t a) {
26 return vdups_laneq_f32(a, 3);
28 // CHECK-NOT: dup {{s[0-9]+}}, {{v[0-9]+}}.s[3]
32 // CHECK-LABEL: test_vdupd_laneq_f64
33 float64_t test_vdupd_laneq_f64(float64x2_t a) {
34 return vdupd_laneq_f64(a, 1);
36 // CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
40 // CHECK-LABEL: test_vdupb_lane_s8
41 int8_t test_vdupb_lane_s8(int8x8_t a) {
42 return vdupb_lane_s8(a, 7);
43 // CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
47 // CHECK-LABEL: test_vduph_lane_s16
48 int16_t test_vduph_lane_s16(int16x4_t a) {
49 return vduph_lane_s16(a, 3);
50 // CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
54 // CHECK-LABEL: test_vdups_lane_s32
55 int32_t test_vdups_lane_s32(int32x2_t a) {
56 return vdups_lane_s32(a, 1);
57 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[1]
61 // CHECK-LABEL: test_vdupd_lane_s64
62 int64_t test_vdupd_lane_s64(int64x1_t a) {
63 return vdupd_lane_s64(a, 0);
64 // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
68 // CHECK-LABEL: test_vdupb_lane_u8
69 uint8_t test_vdupb_lane_u8(uint8x8_t a) {
70 return vdupb_lane_u8(a, 7);
71 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
75 // CHECK-LABEL: test_vduph_lane_u16
76 uint16_t test_vduph_lane_u16(uint16x4_t a) {
77 return vduph_lane_u16(a, 3);
78 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
82 // CHECK-LABEL: test_vdups_lane_u32
83 uint32_t test_vdups_lane_u32(uint32x2_t a) {
84 return vdups_lane_u32(a, 1);
85 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[1]
89 // CHECK-LABEL: test_vdupd_lane_u64
90 uint64_t test_vdupd_lane_u64(uint64x1_t a) {
91 return vdupd_lane_u64(a, 0);
92 // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
95 // CHECK-LABEL: test_vdupb_laneq_s8
96 int8_t test_vdupb_laneq_s8(int8x16_t a) {
97 return vdupb_laneq_s8(a, 15);
98 // CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
102 // CHECK-LABEL: test_vduph_laneq_s16
103 int16_t test_vduph_laneq_s16(int16x8_t a) {
104 return vduph_laneq_s16(a, 7);
105 // CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]
109 // CHECK-LABEL: test_vdups_laneq_s32
110 int32_t test_vdups_laneq_s32(int32x4_t a) {
111 return vdups_laneq_s32(a, 3);
112 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[3]
116 // CHECK-LABEL: test_vdupd_laneq_s64
117 int64_t test_vdupd_laneq_s64(int64x2_t a) {
118 return vdupd_laneq_s64(a, 1);
119 // CHECK: {{mov|umov}} {{x[0-9]+}}, {{v[0-9]+}}.d[1]
123 // CHECK-LABEL: test_vdupb_laneq_u8
124 uint8_t test_vdupb_laneq_u8(uint8x16_t a) {
125 return vdupb_laneq_u8(a, 15);
126 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
130 // CHECK-LABEL: test_vduph_laneq_u16
131 uint16_t test_vduph_laneq_u16(uint16x8_t a) {
132 return vduph_laneq_u16(a, 7);
133 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]
137 // CHECK-LABEL: test_vdups_laneq_u32
138 uint32_t test_vdups_laneq_u32(uint32x4_t a) {
139 return vdups_laneq_u32(a, 3);
140 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[3]
144 // CHECK-LABEL: test_vdupd_laneq_u64
145 uint64_t test_vdupd_laneq_u64(uint64x2_t a) {
146 return vdupd_laneq_u64(a, 1);
147 // CHECK: {{mov|umov}} {{x[0-9]+}}, {{v[0-9]+}}.d[1]
150 // CHECK-LABEL: test_vdupb_lane_p8
151 poly8_t test_vdupb_lane_p8(poly8x8_t a) {
152 return vdupb_lane_p8(a, 7);
153 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
156 // CHECK-LABEL: test_vduph_lane_p16
157 poly16_t test_vduph_lane_p16(poly16x4_t a) {
158 return vduph_lane_p16(a, 3);
159 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
162 // CHECK-LABEL: test_vdupb_laneq_p8
163 poly8_t test_vdupb_laneq_p8(poly8x16_t a) {
164 return vdupb_laneq_p8(a, 15);
165 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
168 // CHECK-LABEL: test_vduph_laneq_p16
169 poly16_t test_vduph_laneq_p16(poly16x8_t a) {
170 return vduph_laneq_p16(a, 7);
171 // CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]