202 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_vector_multiply_subtract_by_scalar_s16(int16x8_t arg_i16x8, int16x4_t arg_i16x4, int32x4_t arg_i32x4) {8 vmls_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 0);9 vmls_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 3);10 vmls_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}11 vmls_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}12 13 vmlsq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 0);14 vmlsq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 3);15 vmlsq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}16 vmlsq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}17 18 vmls_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 0);19 vmls_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 7);20 vmls_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}21 vmls_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}22 23 vmlsq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 0);24 vmlsq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 7);25 vmlsq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}26 vmlsq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}27 28 vmlsl_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 0);29 vmlsl_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 3);30 vmlsl_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}31 vmlsl_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}32 33 vmlsl_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 0);34 vmlsl_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 3);35 vmlsl_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}36 vmlsl_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}37 38 vmlsl_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 0);39 vmlsl_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 7);40 vmlsl_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}41 vmlsl_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}42 43 vmlsl_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 0);44 vmlsl_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 7);45 vmlsl_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}46 vmlsl_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}47 48}49 50void test_vector_multiply_subtract_by_scalar_s32(int64x2_t arg_i64x2, int32x4_t arg_i32x4, int32x2_t arg_i32x2) {51 vmls_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 0);52 vmls_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 1);53 vmls_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}54 vmls_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}55 56 vmlsq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 0);57 vmlsq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 1);58 vmlsq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}59 vmlsq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}60 61 vmls_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 0);62 vmls_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 3);63 vmls_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}64 vmls_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}65 66 vmlsq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 0);67 vmlsq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 3);68 vmlsq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}69 vmlsq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}70 71 vmlsl_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 0);72 vmlsl_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 1);73 vmlsl_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}74 vmlsl_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}75 76 vmlsl_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 0);77 vmlsl_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 1);78 vmlsl_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}79 vmlsl_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}80 81 vmlsl_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 0);82 vmlsl_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 3);83 vmlsl_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}84 vmlsl_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}85 86 vmlsl_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 0);87 vmlsl_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 3);88 vmlsl_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}89 vmlsl_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}90 91}92 93void test_vector_multiply_subtract_by_scalar_u16(uint16x8_t arg_u16x8, uint16x4_t arg_u16x4, uint32x4_t arg_u32x4) {94 vmls_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 0);95 vmls_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 3);96 vmls_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}97 vmls_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}98 99 vmlsq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 0);100 vmlsq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 3);101 vmlsq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}102 vmlsq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}103 104 vmls_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 0);105 vmls_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 7);106 vmls_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}107 vmls_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}108 109 vmlsq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 0);110 vmlsq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 7);111 vmlsq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}112 vmlsq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}113 114 vmlsl_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 0);115 vmlsl_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 3);116 vmlsl_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}117 vmlsl_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}118 119 vmlsl_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 0);120 vmlsl_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 3);121 vmlsl_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}122 vmlsl_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}123 124 vmlsl_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 0);125 vmlsl_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 7);126 vmlsl_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}127 vmlsl_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}128 129 vmlsl_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 0);130 vmlsl_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 7);131 vmlsl_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}132 vmlsl_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}133 134}135 136void test_vector_multiply_subtract_by_scalar_u32(uint64x2_t arg_u64x2, uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) {137 vmls_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 0);138 vmls_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 1);139 vmls_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}140 vmls_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}141 142 vmlsq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 0);143 vmlsq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 1);144 vmlsq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}145 vmlsq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}146 147 vmls_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 0);148 vmls_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 3);149 vmls_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}150 vmls_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}151 152 vmlsq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 0);153 vmlsq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 3);154 vmlsq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}155 vmlsq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}156 157 vmlsl_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 0);158 vmlsl_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 1);159 vmlsl_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}160 vmlsl_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}161 162 vmlsl_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 0);163 vmlsl_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 1);164 vmlsl_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}165 vmlsl_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}166 167 vmlsl_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 0);168 vmlsl_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 3);169 vmlsl_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}170 vmlsl_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}171 172 vmlsl_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 0);173 vmlsl_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 3);174 vmlsl_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}175 vmlsl_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}176 177}178 179void test_vector_multiply_subtract_by_scalar_f32(float32x4_t arg_f32x4, float32x2_t arg_f32x2) {180 vmls_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 0);181 vmls_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 1);182 vmls_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}183 vmls_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}184 185 vmlsq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 0);186 vmlsq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 1);187 vmlsq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}188 vmlsq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}189 190 vmls_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 0);191 vmls_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 3);192 vmls_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}193 vmls_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}194 195 vmlsq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 0);196 vmlsq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 3);197 vmlsq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}198 vmlsq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}199 200}201 202