| 1 |
// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s |
| 2 |
|
| 3 |
#include <arm_neon.h> |
| 4 |
// REQUIRES: aarch64-registered-target |
| 5 |
|
| 6 |
// Widening left-shifts should have a range of 0..(sizeinbits(arg)-1), this range has had |
| 7 |
// to be weakened to 0..((sizeinbits(arg)*2)-1) due to a use of vshll_n_s16 with an |
| 8 |
// out-of-bounds immediate in the defintiion of vcvt_f32_bf16. As a result, the upper bounds |
| 9 |
// of widening left-shift intrinsics are not currently tested here. |
| 10 |
|
| 11 |
void test_vector_shift_left_s8(int8x8_t arg_i8x8, int8x16_t arg_i8x16) { |
| 12 |
vshl_n_s8(arg_i8x8, 0); |
| 13 |
vshl_n_s8(arg_i8x8, 7); |
| 14 |
vshl_n_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 15 |
vshl_n_s8(arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 16 |
|
| 17 |
vshlq_n_s8(arg_i8x16, 0); |
| 18 |
vshlq_n_s8(arg_i8x16, 7); |
| 19 |
vshlq_n_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 20 |
vshlq_n_s8(arg_i8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 21 |
|
| 22 |
} |
| 23 |
|
| 24 |
void test_vector_shift_left_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8) { |
| 25 |
vshl_n_s16(arg_i16x4, 0); |
| 26 |
vshl_n_s16(arg_i16x4, 15); |
| 27 |
vshl_n_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 28 |
vshl_n_s16(arg_i16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 29 |
|
| 30 |
vshlq_n_s16(arg_i16x8, 0); |
| 31 |
vshlq_n_s16(arg_i16x8, 15); |
| 32 |
vshlq_n_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 33 |
vshlq_n_s16(arg_i16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
void test_vector_shift_left_s32(int32x2_t arg_i32x2, int32x4_t arg_i32x4) { |
| 38 |
vshl_n_s32(arg_i32x2, 0); |
| 39 |
vshl_n_s32(arg_i32x2, 31); |
| 40 |
vshl_n_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 41 |
vshl_n_s32(arg_i32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 42 |
|
| 43 |
vshlq_n_s32(arg_i32x4, 0); |
| 44 |
vshlq_n_s32(arg_i32x4, 31); |
| 45 |
vshlq_n_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 46 |
vshlq_n_s32(arg_i32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 47 |
|
| 48 |
} |
| 49 |
|
| 50 |
void test_vector_shift_left_s64(int64_t arg_i64, int64x2_t arg_i64x2, int64x1_t arg_i64x1) { |
| 51 |
vshl_n_s64(arg_i64x1, 0); |
| 52 |
vshl_n_s64(arg_i64x1, 63); |
| 53 |
vshl_n_s64(arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 54 |
vshl_n_s64(arg_i64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 55 |
|
| 56 |
vshlq_n_s64(arg_i64x2, 0); |
| 57 |
vshlq_n_s64(arg_i64x2, 63); |
| 58 |
vshlq_n_s64(arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 59 |
vshlq_n_s64(arg_i64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 60 |
|
| 61 |
vshld_n_s64(arg_i64, 0); |
| 62 |
vshld_n_s64(arg_i64, 63); |
| 63 |
vshld_n_s64(arg_i64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 64 |
vshld_n_s64(arg_i64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 65 |
|
| 66 |
} |
| 67 |
|
| 68 |
void test_vector_shift_left_u8(uint8x8_t arg_u8x8, uint8x16_t arg_u8x16) { |
| 69 |
vshl_n_u8(arg_u8x8, 0); |
| 70 |
vshl_n_u8(arg_u8x8, 7); |
| 71 |
vshl_n_u8(arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 72 |
vshl_n_u8(arg_u8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 73 |
|
| 74 |
vshlq_n_u8(arg_u8x16, 0); |
| 75 |
vshlq_n_u8(arg_u8x16, 7); |
| 76 |
vshlq_n_u8(arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 77 |
vshlq_n_u8(arg_u8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 78 |
|
| 79 |
} |
| 80 |
|
| 81 |
void test_vector_shift_left_u16(uint16x4_t arg_u16x4, uint16x8_t arg_u16x8) { |
| 82 |
vshl_n_u16(arg_u16x4, 0); |
| 83 |
vshl_n_u16(arg_u16x4, 15); |
| 84 |
vshl_n_u16(arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 85 |
vshl_n_u16(arg_u16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 86 |
|
| 87 |
vshlq_n_u16(arg_u16x8, 0); |
| 88 |
vshlq_n_u16(arg_u16x8, 15); |
| 89 |
vshlq_n_u16(arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 90 |
vshlq_n_u16(arg_u16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 91 |
|
| 92 |
} |
| 93 |
|
| 94 |
void test_vector_shift_left_u32(uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) { |
| 95 |
vshl_n_u32(arg_u32x2, 0); |
| 96 |
vshl_n_u32(arg_u32x2, 31); |
| 97 |
vshl_n_u32(arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 98 |
vshl_n_u32(arg_u32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 99 |
|
| 100 |
vshlq_n_u32(arg_u32x4, 0); |
| 101 |
vshlq_n_u32(arg_u32x4, 31); |
| 102 |
vshlq_n_u32(arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 103 |
vshlq_n_u32(arg_u32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 104 |
|
| 105 |
} |
| 106 |
|
| 107 |
void test_vector_shift_left_u64(uint64x1_t arg_u64x1, uint64_t arg_u64, uint64x2_t arg_u64x2) { |
| 108 |
vshl_n_u64(arg_u64x1, 0); |
| 109 |
vshl_n_u64(arg_u64x1, 63); |
| 110 |
vshl_n_u64(arg_u64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 111 |
vshl_n_u64(arg_u64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 112 |
|
| 113 |
vshlq_n_u64(arg_u64x2, 0); |
| 114 |
vshlq_n_u64(arg_u64x2, 63); |
| 115 |
vshlq_n_u64(arg_u64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 116 |
vshlq_n_u64(arg_u64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 117 |
|
| 118 |
vshld_n_u64(arg_u64, 0); |
| 119 |
vshld_n_u64(arg_u64, 63); |
| 120 |
vshld_n_u64(arg_u64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 121 |
vshld_n_u64(arg_u64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 122 |
|
| 123 |
} |
| 124 |
|
| 125 |
void test_vector_saturating_shift_left_s8(int8x8_t arg_i8x8, int8x16_t arg_i8x16, int8_t arg_i8) { |
| 126 |
vqshl_n_s8(arg_i8x8, 0); |
| 127 |
vqshl_n_s8(arg_i8x8, 7); |
| 128 |
vqshl_n_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 129 |
vqshl_n_s8(arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 130 |
|
| 131 |
vqshlq_n_s8(arg_i8x16, 0); |
| 132 |
vqshlq_n_s8(arg_i8x16, 7); |
| 133 |
vqshlq_n_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 134 |
vqshlq_n_s8(arg_i8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 135 |
|
| 136 |
vqshlb_n_s8(arg_i8, 0); |
| 137 |
vqshlb_n_s8(arg_i8, 7); |
| 138 |
vqshlb_n_s8(arg_i8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 139 |
vqshlb_n_s8(arg_i8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 140 |
|
| 141 |
vqshlu_n_s8(arg_i8x8, 0); |
| 142 |
vqshlu_n_s8(arg_i8x8, 7); |
| 143 |
vqshlu_n_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 144 |
vqshlu_n_s8(arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 145 |
|
| 146 |
vqshluq_n_s8(arg_i8x16, 0); |
| 147 |
vqshluq_n_s8(arg_i8x16, 7); |
| 148 |
vqshluq_n_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 149 |
vqshluq_n_s8(arg_i8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 150 |
|
| 151 |
vqshlub_n_s8(arg_i8, 0); |
| 152 |
vqshlub_n_s8(arg_i8, 7); |
| 153 |
vqshlub_n_s8(arg_i8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 154 |
vqshlub_n_s8(arg_i8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 155 |
|
| 156 |
} |
| 157 |
|
| 158 |
void test_vector_saturating_shift_left_s16(int16x4_t arg_i16x4, int16_t arg_i16, int16x8_t arg_i16x8) { |
| 159 |
vqshl_n_s16(arg_i16x4, 0); |
| 160 |
vqshl_n_s16(arg_i16x4, 15); |
| 161 |
vqshl_n_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 162 |
vqshl_n_s16(arg_i16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 163 |
|
| 164 |
vqshlq_n_s16(arg_i16x8, 0); |
| 165 |
vqshlq_n_s16(arg_i16x8, 15); |
| 166 |
vqshlq_n_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 167 |
vqshlq_n_s16(arg_i16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 168 |
|
| 169 |
vqshlh_n_s16(arg_i16, 0); |
| 170 |
vqshlh_n_s16(arg_i16, 15); |
| 171 |
vqshlh_n_s16(arg_i16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 172 |
vqshlh_n_s16(arg_i16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 173 |
|
| 174 |
vqshlu_n_s16(arg_i16x4, 0); |
| 175 |
vqshlu_n_s16(arg_i16x4, 15); |
| 176 |
vqshlu_n_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 177 |
vqshlu_n_s16(arg_i16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 178 |
|
| 179 |
vqshluq_n_s16(arg_i16x8, 0); |
| 180 |
vqshluq_n_s16(arg_i16x8, 15); |
| 181 |
vqshluq_n_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 182 |
vqshluq_n_s16(arg_i16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 183 |
|
| 184 |
vqshluh_n_s16(arg_i16, 0); |
| 185 |
vqshluh_n_s16(arg_i16, 15); |
| 186 |
vqshluh_n_s16(arg_i16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 187 |
vqshluh_n_s16(arg_i16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 188 |
|
| 189 |
} |
| 190 |
|
| 191 |
void test_vector_saturating_shift_left_s32(int32x2_t arg_i32x2, int32_t arg_i32, int32x4_t arg_i32x4) { |
| 192 |
vqshl_n_s32(arg_i32x2, 0); |
| 193 |
vqshl_n_s32(arg_i32x2, 31); |
| 194 |
vqshl_n_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 195 |
vqshl_n_s32(arg_i32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 196 |
|
| 197 |
vqshlq_n_s32(arg_i32x4, 0); |
| 198 |
vqshlq_n_s32(arg_i32x4, 31); |
| 199 |
vqshlq_n_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 200 |
vqshlq_n_s32(arg_i32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 201 |
|
| 202 |
vqshls_n_s32(arg_i32, 0); |
| 203 |
vqshls_n_s32(arg_i32, 31); |
| 204 |
vqshls_n_s32(arg_i32, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 205 |
vqshls_n_s32(arg_i32, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 206 |
|
| 207 |
vqshlu_n_s32(arg_i32x2, 0); |
| 208 |
vqshlu_n_s32(arg_i32x2, 31); |
| 209 |
vqshlu_n_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 210 |
vqshlu_n_s32(arg_i32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 211 |
|
| 212 |
vqshluq_n_s32(arg_i32x4, 0); |
| 213 |
vqshluq_n_s32(arg_i32x4, 31); |
| 214 |
vqshluq_n_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 215 |
vqshluq_n_s32(arg_i32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 216 |
|
| 217 |
vqshlus_n_s32(arg_i32, 0); |
| 218 |
vqshlus_n_s32(arg_i32, 31); |
| 219 |
vqshlus_n_s32(arg_i32, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 220 |
vqshlus_n_s32(arg_i32, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 221 |
|
| 222 |
} |
| 223 |
|
| 224 |
void test_vector_saturating_shift_left_s64(int64_t arg_i64, int64x2_t arg_i64x2, int64x1_t arg_i64x1) { |
| 225 |
vqshl_n_s64(arg_i64x1, 0); |
| 226 |
vqshl_n_s64(arg_i64x1, 63); |
| 227 |
vqshl_n_s64(arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 228 |
vqshl_n_s64(arg_i64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 229 |
|
| 230 |
vqshlq_n_s64(arg_i64x2, 0); |
| 231 |
vqshlq_n_s64(arg_i64x2, 63); |
| 232 |
vqshlq_n_s64(arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 233 |
vqshlq_n_s64(arg_i64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 234 |
|
| 235 |
vqshld_n_s64(arg_i64, 0); |
| 236 |
vqshld_n_s64(arg_i64, 63); |
| 237 |
vqshld_n_s64(arg_i64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 238 |
vqshld_n_s64(arg_i64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 239 |
|
| 240 |
vqshlu_n_s64(arg_i64x1, 0); |
| 241 |
vqshlu_n_s64(arg_i64x1, 63); |
| 242 |
vqshlu_n_s64(arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 243 |
vqshlu_n_s64(arg_i64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 244 |
|
| 245 |
vqshluq_n_s64(arg_i64x2, 0); |
| 246 |
vqshluq_n_s64(arg_i64x2, 63); |
| 247 |
vqshluq_n_s64(arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 248 |
vqshluq_n_s64(arg_i64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 249 |
|
| 250 |
vqshlud_n_s64(arg_i64, 0); |
| 251 |
vqshlud_n_s64(arg_i64, 63); |
| 252 |
vqshlud_n_s64(arg_i64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 253 |
vqshlud_n_s64(arg_i64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 254 |
|
| 255 |
} |
| 256 |
|
| 257 |
void test_vector_saturating_shift_left_u8(uint8x8_t arg_u8x8, uint8_t arg_u8, uint8x16_t arg_u8x16) { |
| 258 |
vqshl_n_u8(arg_u8x8, 0); |
| 259 |
vqshl_n_u8(arg_u8x8, 7); |
| 260 |
vqshl_n_u8(arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 261 |
vqshl_n_u8(arg_u8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 262 |
|
| 263 |
vqshlq_n_u8(arg_u8x16, 0); |
| 264 |
vqshlq_n_u8(arg_u8x16, 7); |
| 265 |
vqshlq_n_u8(arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 266 |
vqshlq_n_u8(arg_u8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 267 |
|
| 268 |
vqshlb_n_u8(arg_u8, 0); |
| 269 |
vqshlb_n_u8(arg_u8, 7); |
| 270 |
vqshlb_n_u8(arg_u8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 271 |
vqshlb_n_u8(arg_u8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 272 |
|
| 273 |
} |
| 274 |
|
| 275 |
void test_vector_saturating_shift_left_u16(uint16_t arg_u16, uint16x4_t arg_u16x4, uint16x8_t arg_u16x8) { |
| 276 |
vqshl_n_u16(arg_u16x4, 0); |
| 277 |
vqshl_n_u16(arg_u16x4, 15); |
| 278 |
vqshl_n_u16(arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 279 |
vqshl_n_u16(arg_u16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 280 |
|
| 281 |
vqshlq_n_u16(arg_u16x8, 0); |
| 282 |
vqshlq_n_u16(arg_u16x8, 15); |
| 283 |
vqshlq_n_u16(arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 284 |
vqshlq_n_u16(arg_u16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 285 |
|
| 286 |
vqshlh_n_u16(arg_u16, 0); |
| 287 |
vqshlh_n_u16(arg_u16, 15); |
| 288 |
vqshlh_n_u16(arg_u16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 289 |
vqshlh_n_u16(arg_u16, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 290 |
|
| 291 |
} |
| 292 |
|
| 293 |
void test_vector_saturating_shift_left_u32(uint32x2_t arg_u32x2, uint32x4_t arg_u32x4, uint32_t arg_u32) { |
| 294 |
vqshl_n_u32(arg_u32x2, 0); |
| 295 |
vqshl_n_u32(arg_u32x2, 31); |
| 296 |
vqshl_n_u32(arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 297 |
vqshl_n_u32(arg_u32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 298 |
|
| 299 |
vqshlq_n_u32(arg_u32x4, 0); |
| 300 |
vqshlq_n_u32(arg_u32x4, 31); |
| 301 |
vqshlq_n_u32(arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 302 |
vqshlq_n_u32(arg_u32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 303 |
|
| 304 |
vqshls_n_u32(arg_u32, 0); |
| 305 |
vqshls_n_u32(arg_u32, 31); |
| 306 |
vqshls_n_u32(arg_u32, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 307 |
vqshls_n_u32(arg_u32, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 308 |
|
| 309 |
} |
| 310 |
|
| 311 |
void test_vector_saturating_shift_left_u64(uint64x1_t arg_u64x1, uint64_t arg_u64, uint64x2_t arg_u64x2) { |
| 312 |
vqshl_n_u64(arg_u64x1, 0); |
| 313 |
vqshl_n_u64(arg_u64x1, 63); |
| 314 |
vqshl_n_u64(arg_u64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 315 |
vqshl_n_u64(arg_u64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 316 |
|
| 317 |
vqshlq_n_u64(arg_u64x2, 0); |
| 318 |
vqshlq_n_u64(arg_u64x2, 63); |
| 319 |
vqshlq_n_u64(arg_u64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 320 |
vqshlq_n_u64(arg_u64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 321 |
|
| 322 |
vqshld_n_u64(arg_u64, 0); |
| 323 |
vqshld_n_u64(arg_u64, 63); |
| 324 |
vqshld_n_u64(arg_u64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 325 |
vqshld_n_u64(arg_u64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 326 |
|
| 327 |
} |
| 328 |
|
| 329 |
void test_vector_shift_left_and_widen_s8(int8x8_t arg_i8x8, int8x16_t arg_i8x16) { |
| 330 |
vshll_n_s8(arg_i8x8, 0); |
| 331 |
vshll_n_s8(arg_i8x8, 7); |
| 332 |
vshll_n_s8(arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 333 |
|
| 334 |
|
| 335 |
vshll_high_n_s8(arg_i8x16, 0); |
| 336 |
vshll_high_n_s8(arg_i8x16, 7); |
| 337 |
vshll_high_n_s8(arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 338 |
} |
| 339 |
|
| 340 |
void test_vector_shift_left_and_widen_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8) { |
| 341 |
vshll_n_s16(arg_i16x4, 0); |
| 342 |
vshll_n_s16(arg_i16x4, 15); |
| 343 |
vshll_n_s16(arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 344 |
|
| 345 |
vshll_high_n_s16(arg_i16x8, 0); |
| 346 |
vshll_high_n_s16(arg_i16x8, 15); |
| 347 |
vshll_high_n_s16(arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 348 |
} |
| 349 |
|
| 350 |
void test_vector_shift_left_and_widen_s32(int32x2_t arg_i32x2, int32x4_t arg_i32x4) { |
| 351 |
vshll_n_s32(arg_i32x2, 0); |
| 352 |
vshll_n_s32(arg_i32x2, 31); |
| 353 |
vshll_n_s32(arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 354 |
|
| 355 |
vshll_high_n_s32(arg_i32x4, 0); |
| 356 |
vshll_high_n_s32(arg_i32x4, 31); |
| 357 |
vshll_high_n_s32(arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 358 |
} |
| 359 |
|
| 360 |
void test_vector_shift_left_and_widen_u8(uint8x8_t arg_u8x8, uint8x16_t arg_u8x16) { |
| 361 |
vshll_n_u8(arg_u8x8, 0); |
| 362 |
vshll_n_u8(arg_u8x8, 7); |
| 363 |
vshll_n_u8(arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 364 |
|
| 365 |
vshll_high_n_u8(arg_u8x16, 0); |
| 366 |
vshll_high_n_u8(arg_u8x16, 7); |
| 367 |
vshll_high_n_u8(arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 368 |
} |
| 369 |
|
| 370 |
void test_vector_shift_left_and_widen_u16(uint16x4_t arg_u16x4, uint16x8_t arg_u16x8) { |
| 371 |
vshll_n_u16(arg_u16x4, 0); |
| 372 |
vshll_n_u16(arg_u16x4, 15); |
| 373 |
vshll_n_u16(arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 374 |
|
| 375 |
vshll_high_n_u16(arg_u16x8, 0); |
| 376 |
vshll_high_n_u16(arg_u16x8, 15); |
| 377 |
vshll_high_n_u16(arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 378 |
} |
| 379 |
|
| 380 |
void test_vector_shift_left_and_widen_u32(uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) { |
| 381 |
vshll_n_u32(arg_u32x2, 0); |
| 382 |
vshll_n_u32(arg_u32x2, 31); |
| 383 |
vshll_n_u32(arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 384 |
|
| 385 |
vshll_high_n_u32(arg_u32x4, 0); |
| 386 |
vshll_high_n_u32(arg_u32x4, 31); |
| 387 |
vshll_high_n_u32(arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 388 |
} |
| 389 |
|
| 390 |
void test_vector_shift_left_and_insert_s8(int8x8_t arg_i8x8, int8x16_t arg_i8x16) { |
| 391 |
vsli_n_s8(arg_i8x8, arg_i8x8, 0); |
| 392 |
vsli_n_s8(arg_i8x8, arg_i8x8, 7); |
| 393 |
vsli_n_s8(arg_i8x8, arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 394 |
vsli_n_s8(arg_i8x8, arg_i8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 395 |
|
| 396 |
vsliq_n_s8(arg_i8x16, arg_i8x16, 0); |
| 397 |
vsliq_n_s8(arg_i8x16, arg_i8x16, 7); |
| 398 |
vsliq_n_s8(arg_i8x16, arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 399 |
vsliq_n_s8(arg_i8x16, arg_i8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 400 |
|
| 401 |
} |
| 402 |
|
| 403 |
void test_vector_shift_left_and_insert_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8) { |
| 404 |
vsli_n_s16(arg_i16x4, arg_i16x4, 0); |
| 405 |
vsli_n_s16(arg_i16x4, arg_i16x4, 15); |
| 406 |
vsli_n_s16(arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 407 |
vsli_n_s16(arg_i16x4, arg_i16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 408 |
|
| 409 |
vsliq_n_s16(arg_i16x8, arg_i16x8, 0); |
| 410 |
vsliq_n_s16(arg_i16x8, arg_i16x8, 15); |
| 411 |
vsliq_n_s16(arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 412 |
vsliq_n_s16(arg_i16x8, arg_i16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 413 |
|
| 414 |
} |
| 415 |
|
| 416 |
void test_vector_shift_left_and_insert_s32(int32x2_t arg_i32x2, int32x4_t arg_i32x4) { |
| 417 |
vsli_n_s32(arg_i32x2, arg_i32x2, 0); |
| 418 |
vsli_n_s32(arg_i32x2, arg_i32x2, 31); |
| 419 |
vsli_n_s32(arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 420 |
vsli_n_s32(arg_i32x2, arg_i32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 421 |
|
| 422 |
vsliq_n_s32(arg_i32x4, arg_i32x4, 0); |
| 423 |
vsliq_n_s32(arg_i32x4, arg_i32x4, 31); |
| 424 |
vsliq_n_s32(arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 425 |
vsliq_n_s32(arg_i32x4, arg_i32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 426 |
|
| 427 |
} |
| 428 |
|
| 429 |
void test_vector_shift_left_and_insert_s64(int64_t arg_i64, int64x2_t arg_i64x2, int64x1_t arg_i64x1) { |
| 430 |
vsli_n_s64(arg_i64x1, arg_i64x1, 0); |
| 431 |
vsli_n_s64(arg_i64x1, arg_i64x1, 63); |
| 432 |
vsli_n_s64(arg_i64x1, arg_i64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 433 |
vsli_n_s64(arg_i64x1, arg_i64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 434 |
|
| 435 |
vsliq_n_s64(arg_i64x2, arg_i64x2, 0); |
| 436 |
vsliq_n_s64(arg_i64x2, arg_i64x2, 63); |
| 437 |
vsliq_n_s64(arg_i64x2, arg_i64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 438 |
vsliq_n_s64(arg_i64x2, arg_i64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 439 |
|
| 440 |
vslid_n_s64(arg_i64, arg_i64, 0); |
| 441 |
vslid_n_s64(arg_i64, arg_i64, 63); |
| 442 |
vslid_n_s64(arg_i64, arg_i64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 443 |
vslid_n_s64(arg_i64, arg_i64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 444 |
|
| 445 |
} |
| 446 |
|
| 447 |
void test_vector_shift_left_and_insert_u8(uint8x8_t arg_u8x8, uint8x16_t arg_u8x16) { |
| 448 |
vsli_n_u8(arg_u8x8, arg_u8x8, 0); |
| 449 |
vsli_n_u8(arg_u8x8, arg_u8x8, 7); |
| 450 |
vsli_n_u8(arg_u8x8, arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 451 |
vsli_n_u8(arg_u8x8, arg_u8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 452 |
|
| 453 |
vsliq_n_u8(arg_u8x16, arg_u8x16, 0); |
| 454 |
vsliq_n_u8(arg_u8x16, arg_u8x16, 7); |
| 455 |
vsliq_n_u8(arg_u8x16, arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 456 |
vsliq_n_u8(arg_u8x16, arg_u8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 457 |
|
| 458 |
} |
| 459 |
|
| 460 |
void test_vector_shift_left_and_insert_u16(uint16x4_t arg_u16x4, uint16x8_t arg_u16x8) { |
| 461 |
vsli_n_u16(arg_u16x4, arg_u16x4, 0); |
| 462 |
vsli_n_u16(arg_u16x4, arg_u16x4, 15); |
| 463 |
vsli_n_u16(arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 464 |
vsli_n_u16(arg_u16x4, arg_u16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 465 |
|
| 466 |
vsliq_n_u16(arg_u16x8, arg_u16x8, 0); |
| 467 |
vsliq_n_u16(arg_u16x8, arg_u16x8, 15); |
| 468 |
vsliq_n_u16(arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 469 |
vsliq_n_u16(arg_u16x8, arg_u16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 470 |
|
| 471 |
} |
| 472 |
|
| 473 |
void test_vector_shift_left_and_insert_u32(uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) { |
| 474 |
vsli_n_u32(arg_u32x2, arg_u32x2, 0); |
| 475 |
vsli_n_u32(arg_u32x2, arg_u32x2, 31); |
| 476 |
vsli_n_u32(arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 477 |
vsli_n_u32(arg_u32x2, arg_u32x2, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 478 |
|
| 479 |
vsliq_n_u32(arg_u32x4, arg_u32x4, 0); |
| 480 |
vsliq_n_u32(arg_u32x4, arg_u32x4, 31); |
| 481 |
vsliq_n_u32(arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 482 |
vsliq_n_u32(arg_u32x4, arg_u32x4, 32); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 483 |
|
| 484 |
} |
| 485 |
|
| 486 |
void test_vector_shift_left_and_insert_u64(uint64x1_t arg_u64x1, uint64_t arg_u64, uint64x2_t arg_u64x2) { |
| 487 |
vsli_n_u64(arg_u64x1, arg_u64x1, 0); |
| 488 |
vsli_n_u64(arg_u64x1, arg_u64x1, 63); |
| 489 |
vsli_n_u64(arg_u64x1, arg_u64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 490 |
vsli_n_u64(arg_u64x1, arg_u64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 491 |
|
| 492 |
vsliq_n_u64(arg_u64x2, arg_u64x2, 0); |
| 493 |
vsliq_n_u64(arg_u64x2, arg_u64x2, 63); |
| 494 |
vsliq_n_u64(arg_u64x2, arg_u64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 495 |
vsliq_n_u64(arg_u64x2, arg_u64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 496 |
|
| 497 |
vslid_n_u64(arg_u64, arg_u64, 0); |
| 498 |
vslid_n_u64(arg_u64, arg_u64, 63); |
| 499 |
vslid_n_u64(arg_u64, arg_u64, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 500 |
vslid_n_u64(arg_u64, arg_u64, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 501 |
|
| 502 |
} |
| 503 |
|
| 504 |
void test_vector_shift_left_and_insert_p64(poly64x2_t arg_p64x2, poly64x1_t arg_p64x1) { |
| 505 |
vsli_n_p64(arg_p64x1, arg_p64x1, 0); |
| 506 |
vsli_n_p64(arg_p64x1, arg_p64x1, 63); |
| 507 |
vsli_n_p64(arg_p64x1, arg_p64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 508 |
vsli_n_p64(arg_p64x1, arg_p64x1, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 509 |
|
| 510 |
vsliq_n_p64(arg_p64x2, arg_p64x2, 0); |
| 511 |
vsliq_n_p64(arg_p64x2, arg_p64x2, 63); |
| 512 |
vsliq_n_p64(arg_p64x2, arg_p64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 513 |
vsliq_n_p64(arg_p64x2, arg_p64x2, 64); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 514 |
|
| 515 |
} |
| 516 |
|
| 517 |
void test_vector_shift_left_and_insert_p8(poly8x16_t arg_p8x16, poly8x8_t arg_p8x8) { |
| 518 |
vsli_n_p8(arg_p8x8, arg_p8x8, 0); |
| 519 |
vsli_n_p8(arg_p8x8, arg_p8x8, 7); |
| 520 |
vsli_n_p8(arg_p8x8, arg_p8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 521 |
vsli_n_p8(arg_p8x8, arg_p8x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 522 |
|
| 523 |
vsliq_n_p8(arg_p8x16, arg_p8x16, 0); |
| 524 |
vsliq_n_p8(arg_p8x16, arg_p8x16, 7); |
| 525 |
vsliq_n_p8(arg_p8x16, arg_p8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 526 |
vsliq_n_p8(arg_p8x16, arg_p8x16, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 527 |
|
| 528 |
} |
| 529 |
|
| 530 |
void test_vector_shift_left_and_insert_p16(poly16x4_t arg_p16x4, poly16x8_t arg_p16x8) { |
| 531 |
vsli_n_p16(arg_p16x4, arg_p16x4, 0); |
| 532 |
vsli_n_p16(arg_p16x4, arg_p16x4, 15); |
| 533 |
vsli_n_p16(arg_p16x4, arg_p16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 534 |
vsli_n_p16(arg_p16x4, arg_p16x4, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 535 |
|
| 536 |
vsliq_n_p16(arg_p16x8, arg_p16x8, 0); |
| 537 |
vsliq_n_p16(arg_p16x8, arg_p16x8, 15); |
| 538 |
vsliq_n_p16(arg_p16x8, arg_p16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 539 |
vsliq_n_p16(arg_p16x8, arg_p16x8, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}} |
| 540 |
|
| 541 |
} |
| 542 |
|