298 lines · c
1// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s2 3#include <arm_neon.h>4// REQUIRES: aarch64-registered-target5 6 7void test_set_all_lanes_to_the_same_value_s8(int8x8_t arg_i8x8, int8x16_t arg_i8x16) {8 vdup_lane_s8(arg_i8x8, 0);9 vdup_lane_s8(arg_i8x8, 7);10 vdup_lane_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}11 vdup_lane_s8(arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}12 13 vdupq_lane_s8(arg_i8x8, 0);14 vdupq_lane_s8(arg_i8x8, 7);15 vdupq_lane_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}16 vdupq_lane_s8(arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}17 18 vdup_laneq_s8(arg_i8x16, 0);19 vdup_laneq_s8(arg_i8x16, 15);20 vdup_laneq_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}21 vdup_laneq_s8(arg_i8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}22 23 vdupq_laneq_s8(arg_i8x16, 0);24 vdupq_laneq_s8(arg_i8x16, 15);25 vdupq_laneq_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}26 vdupq_laneq_s8(arg_i8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}27 28}29 30void test_set_all_lanes_to_the_same_value_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8) {31 vdup_lane_s16(arg_i16x4, 0);32 vdup_lane_s16(arg_i16x4, 3);33 vdup_lane_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}34 vdup_lane_s16(arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}35 36 vdupq_lane_s16(arg_i16x4, 0);37 vdupq_lane_s16(arg_i16x4, 3);38 vdupq_lane_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}39 vdupq_lane_s16(arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}40 41 vdup_laneq_s16(arg_i16x8, 0);42 vdup_laneq_s16(arg_i16x8, 7);43 vdup_laneq_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}44 vdup_laneq_s16(arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}45 46 vdupq_laneq_s16(arg_i16x8, 0);47 vdupq_laneq_s16(arg_i16x8, 7);48 vdupq_laneq_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}49 vdupq_laneq_s16(arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}50 51}52 53void test_set_all_lanes_to_the_same_value_s32(int32x4_t arg_i32x4, int32x2_t arg_i32x2) {54 vdup_lane_s32(arg_i32x2, 0);55 vdup_lane_s32(arg_i32x2, 1);56 vdup_lane_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}57 vdup_lane_s32(arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}58 59 vdupq_lane_s32(arg_i32x2, 0);60 vdupq_lane_s32(arg_i32x2, 1);61 vdupq_lane_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}62 vdupq_lane_s32(arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}63 64 vdup_laneq_s32(arg_i32x4, 0);65 vdup_laneq_s32(arg_i32x4, 3);66 vdup_laneq_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}67 vdup_laneq_s32(arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}68 69 vdupq_laneq_s32(arg_i32x4, 0);70 vdupq_laneq_s32(arg_i32x4, 3);71 vdupq_laneq_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}72 vdupq_laneq_s32(arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}73 74}75 76void test_set_all_lanes_to_the_same_value_s64(int64x1_t arg_i64x1, int64x2_t arg_i64x2) {77 vdup_lane_s64(arg_i64x1, 0);78 vdup_lane_s64(arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}79 vdup_lane_s64(arg_i64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}80 81 vdupq_lane_s64(arg_i64x1, 0);82 vdupq_lane_s64(arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}83 vdupq_lane_s64(arg_i64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}84 85 vdup_laneq_s64(arg_i64x2, 0);86 vdup_laneq_s64(arg_i64x2, 1);87 vdup_laneq_s64(arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}88 vdup_laneq_s64(arg_i64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}89 90 vdupq_laneq_s64(arg_i64x2, 0);91 vdupq_laneq_s64(arg_i64x2, 1);92 vdupq_laneq_s64(arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}93 vdupq_laneq_s64(arg_i64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}94 95}96 97void test_set_all_lanes_to_the_same_value_u8(uint8x8_t arg_u8x8, uint8x16_t arg_u8x16) {98 vdup_lane_u8(arg_u8x8, 0);99 vdup_lane_u8(arg_u8x8, 7);100 vdup_lane_u8(arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}101 vdup_lane_u8(arg_u8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}102 103 vdupq_lane_u8(arg_u8x8, 0);104 vdupq_lane_u8(arg_u8x8, 7);105 vdupq_lane_u8(arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}106 vdupq_lane_u8(arg_u8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}107 108 vdup_laneq_u8(arg_u8x16, 0);109 vdup_laneq_u8(arg_u8x16, 15);110 vdup_laneq_u8(arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}111 vdup_laneq_u8(arg_u8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}112 113 vdupq_laneq_u8(arg_u8x16, 0);114 vdupq_laneq_u8(arg_u8x16, 15);115 vdupq_laneq_u8(arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}116 vdupq_laneq_u8(arg_u8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}117 118}119 120void test_set_all_lanes_to_the_same_value_u16(uint16x4_t arg_u16x4, uint16x8_t arg_u16x8) {121 vdup_lane_u16(arg_u16x4, 0);122 vdup_lane_u16(arg_u16x4, 3);123 vdup_lane_u16(arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}124 vdup_lane_u16(arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}125 126 vdupq_lane_u16(arg_u16x4, 0);127 vdupq_lane_u16(arg_u16x4, 3);128 vdupq_lane_u16(arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}129 vdupq_lane_u16(arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}130 131 vdup_laneq_u16(arg_u16x8, 0);132 vdup_laneq_u16(arg_u16x8, 7);133 vdup_laneq_u16(arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}134 vdup_laneq_u16(arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}135 136 vdupq_laneq_u16(arg_u16x8, 0);137 vdupq_laneq_u16(arg_u16x8, 7);138 vdupq_laneq_u16(arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}139 vdupq_laneq_u16(arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}140 141}142 143void test_set_all_lanes_to_the_same_value_u32(uint32x4_t arg_u32x4, uint32x2_t arg_u32x2) {144 vdup_lane_u32(arg_u32x2, 0);145 vdup_lane_u32(arg_u32x2, 1);146 vdup_lane_u32(arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}147 vdup_lane_u32(arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}148 149 vdupq_lane_u32(arg_u32x2, 0);150 vdupq_lane_u32(arg_u32x2, 1);151 vdupq_lane_u32(arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}152 vdupq_lane_u32(arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}153 154 vdup_laneq_u32(arg_u32x4, 0);155 vdup_laneq_u32(arg_u32x4, 3);156 vdup_laneq_u32(arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}157 vdup_laneq_u32(arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}158 159 vdupq_laneq_u32(arg_u32x4, 0);160 vdupq_laneq_u32(arg_u32x4, 3);161 vdupq_laneq_u32(arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}162 vdupq_laneq_u32(arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}163 164}165 166void test_set_all_lanes_to_the_same_value_u64(uint64x1_t arg_u64x1, uint64x2_t arg_u64x2) {167 vdup_lane_u64(arg_u64x1, 0);168 vdup_lane_u64(arg_u64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}169 vdup_lane_u64(arg_u64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}170 171 vdupq_lane_u64(arg_u64x1, 0);172 vdupq_lane_u64(arg_u64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}173 vdupq_lane_u64(arg_u64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}174 175 vdup_laneq_u64(arg_u64x2, 0);176 vdup_laneq_u64(arg_u64x2, 1);177 vdup_laneq_u64(arg_u64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}178 vdup_laneq_u64(arg_u64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}179 180 vdupq_laneq_u64(arg_u64x2, 0);181 vdupq_laneq_u64(arg_u64x2, 1);182 vdupq_laneq_u64(arg_u64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}183 vdupq_laneq_u64(arg_u64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}184 185}186 187void test_set_all_lanes_to_the_same_value_p64(poly64x1_t arg_p64x1, poly64x2_t arg_p64x2) {188 vdup_lane_p64(arg_p64x1, 0);189 vdup_lane_p64(arg_p64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}190 vdup_lane_p64(arg_p64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}191 192 vdupq_lane_p64(arg_p64x1, 0);193 vdupq_lane_p64(arg_p64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}194 vdupq_lane_p64(arg_p64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}195 196 vdup_laneq_p64(arg_p64x2, 0);197 vdup_laneq_p64(arg_p64x2, 1);198 vdup_laneq_p64(arg_p64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}199 vdup_laneq_p64(arg_p64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}200 201 vdupq_laneq_p64(arg_p64x2, 0);202 vdupq_laneq_p64(arg_p64x2, 1);203 vdupq_laneq_p64(arg_p64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}204 vdupq_laneq_p64(arg_p64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}205 206}207 208void test_set_all_lanes_to_the_same_value_f32(float32x2_t arg_f32x2, float32x4_t arg_f32x4) {209 vdup_lane_f32(arg_f32x2, 0);210 vdup_lane_f32(arg_f32x2, 1);211 vdup_lane_f32(arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}212 vdup_lane_f32(arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}213 214 vdupq_lane_f32(arg_f32x2, 0);215 vdupq_lane_f32(arg_f32x2, 1);216 vdupq_lane_f32(arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}217 vdupq_lane_f32(arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}218 219 vdup_laneq_f32(arg_f32x4, 0);220 vdup_laneq_f32(arg_f32x4, 3);221 vdup_laneq_f32(arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}222 vdup_laneq_f32(arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}223 224 vdupq_laneq_f32(arg_f32x4, 0);225 vdupq_laneq_f32(arg_f32x4, 3);226 vdupq_laneq_f32(arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}227 vdupq_laneq_f32(arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}228 229}230 231void test_set_all_lanes_to_the_same_value_p8(poly8x16_t arg_p8x16, poly8x8_t arg_p8x8) {232 vdup_lane_p8(arg_p8x8, 0);233 vdup_lane_p8(arg_p8x8, 7);234 vdup_lane_p8(arg_p8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}235 vdup_lane_p8(arg_p8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}236 237 vdupq_lane_p8(arg_p8x8, 0);238 vdupq_lane_p8(arg_p8x8, 7);239 vdupq_lane_p8(arg_p8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}240 vdupq_lane_p8(arg_p8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}241 242 vdup_laneq_p8(arg_p8x16, 0);243 vdup_laneq_p8(arg_p8x16, 15);244 vdup_laneq_p8(arg_p8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}245 vdup_laneq_p8(arg_p8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}246 247 vdupq_laneq_p8(arg_p8x16, 0);248 vdupq_laneq_p8(arg_p8x16, 15);249 vdupq_laneq_p8(arg_p8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}250 vdupq_laneq_p8(arg_p8x16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}251 252}253 254void test_set_all_lanes_to_the_same_value_p16(poly16x4_t arg_p16x4, poly16x8_t arg_p16x8) {255 vdup_lane_p16(arg_p16x4, 0);256 vdup_lane_p16(arg_p16x4, 3);257 vdup_lane_p16(arg_p16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}258 vdup_lane_p16(arg_p16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}259 260 vdupq_lane_p16(arg_p16x4, 0);261 vdupq_lane_p16(arg_p16x4, 3);262 vdupq_lane_p16(arg_p16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}263 vdupq_lane_p16(arg_p16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}264 265 vdup_laneq_p16(arg_p16x8, 0);266 vdup_laneq_p16(arg_p16x8, 7);267 vdup_laneq_p16(arg_p16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}268 vdup_laneq_p16(arg_p16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}269 270 vdupq_laneq_p16(arg_p16x8, 0);271 vdupq_laneq_p16(arg_p16x8, 7);272 vdupq_laneq_p16(arg_p16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}273 vdupq_laneq_p16(arg_p16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}274 275}276 277void test_set_all_lanes_to_the_same_value_f64(float64x2_t arg_f64x2, float64x1_t arg_f64x1) {278 vdup_lane_f64(arg_f64x1, 0);279 vdup_lane_f64(arg_f64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}280 vdup_lane_f64(arg_f64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}281 282 vdupq_lane_f64(arg_f64x1, 0);283 vdupq_lane_f64(arg_f64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}284 vdupq_lane_f64(arg_f64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}285 286 vdup_laneq_f64(arg_f64x2, 0);287 vdup_laneq_f64(arg_f64x2, 1);288 vdup_laneq_f64(arg_f64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}289 vdup_laneq_f64(arg_f64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}290 291 vdupq_laneq_f64(arg_f64x2, 0);292 vdupq_laneq_f64(arg_f64x2, 1);293 vdupq_laneq_f64(arg_f64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}294 vdupq_laneq_f64(arg_f64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}295 296}297 298