brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.3 KiB · 7c9e73f Raw
161 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_by_scalar_s16(int16x4_t arg_i16x4, int16x8_t arg_i16x8) {8	vmul_lane_s16(arg_i16x4, arg_i16x4, 0);9	vmul_lane_s16(arg_i16x4, arg_i16x4, 3);10	vmul_lane_s16(arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}11	vmul_lane_s16(arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}12 13	vmulq_lane_s16(arg_i16x8, arg_i16x4, 0);14	vmulq_lane_s16(arg_i16x8, arg_i16x4, 3);15	vmulq_lane_s16(arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}16	vmulq_lane_s16(arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}17 18	vmul_laneq_s16(arg_i16x4, arg_i16x8, 0);19	vmul_laneq_s16(arg_i16x4, arg_i16x8, 7);20	vmul_laneq_s16(arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}21	vmul_laneq_s16(arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}22 23	vmulq_laneq_s16(arg_i16x8, arg_i16x8, 0);24	vmulq_laneq_s16(arg_i16x8, arg_i16x8, 7);25	vmulq_laneq_s16(arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}26	vmulq_laneq_s16(arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}27 28}29 30void test_vector_multiply_by_scalar_s32(int32x2_t arg_i32x2, int32x4_t arg_i32x4) {31	vmul_lane_s32(arg_i32x2, arg_i32x2, 0);32	vmul_lane_s32(arg_i32x2, arg_i32x2, 1);33	vmul_lane_s32(arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}34	vmul_lane_s32(arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}35 36	vmulq_lane_s32(arg_i32x4, arg_i32x2, 0);37	vmulq_lane_s32(arg_i32x4, arg_i32x2, 1);38	vmulq_lane_s32(arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}39	vmulq_lane_s32(arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}40 41	vmul_laneq_s32(arg_i32x2, arg_i32x4, 0);42	vmul_laneq_s32(arg_i32x2, arg_i32x4, 3);43	vmul_laneq_s32(arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}44	vmul_laneq_s32(arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}45 46	vmulq_laneq_s32(arg_i32x4, arg_i32x4, 0);47	vmulq_laneq_s32(arg_i32x4, arg_i32x4, 3);48	vmulq_laneq_s32(arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}49	vmulq_laneq_s32(arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}50 51}52 53void test_vector_multiply_by_scalar_u16(uint16x8_t arg_u16x8, uint16x4_t arg_u16x4) {54	vmul_lane_u16(arg_u16x4, arg_u16x4, 0);55	vmul_lane_u16(arg_u16x4, arg_u16x4, 3);56	vmul_lane_u16(arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}57	vmul_lane_u16(arg_u16x4, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}58 59	vmulq_lane_u16(arg_u16x8, arg_u16x4, 0);60	vmulq_lane_u16(arg_u16x8, arg_u16x4, 3);61	vmulq_lane_u16(arg_u16x8, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}62	vmulq_lane_u16(arg_u16x8, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}63 64	vmul_laneq_u16(arg_u16x4, arg_u16x8, 0);65	vmul_laneq_u16(arg_u16x4, arg_u16x8, 7);66	vmul_laneq_u16(arg_u16x4, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}67	vmul_laneq_u16(arg_u16x4, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}68 69	vmulq_laneq_u16(arg_u16x8, arg_u16x8, 0);70	vmulq_laneq_u16(arg_u16x8, arg_u16x8, 7);71	vmulq_laneq_u16(arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}72	vmulq_laneq_u16(arg_u16x8, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}73 74}75 76void test_vector_multiply_by_scalar_u32(uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) {77	vmul_lane_u32(arg_u32x2, arg_u32x2, 0);78	vmul_lane_u32(arg_u32x2, arg_u32x2, 1);79	vmul_lane_u32(arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}80	vmul_lane_u32(arg_u32x2, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}81 82	vmulq_lane_u32(arg_u32x4, arg_u32x2, 0);83	vmulq_lane_u32(arg_u32x4, arg_u32x2, 1);84	vmulq_lane_u32(arg_u32x4, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}85	vmulq_lane_u32(arg_u32x4, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}86 87	vmul_laneq_u32(arg_u32x2, arg_u32x4, 0);88	vmul_laneq_u32(arg_u32x2, arg_u32x4, 3);89	vmul_laneq_u32(arg_u32x2, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}90	vmul_laneq_u32(arg_u32x2, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}91 92	vmulq_laneq_u32(arg_u32x4, arg_u32x4, 0);93	vmulq_laneq_u32(arg_u32x4, arg_u32x4, 3);94	vmulq_laneq_u32(arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}95	vmulq_laneq_u32(arg_u32x4, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}96 97}98 99void test_vector_multiply_by_scalar_f32(float32_t arg_f32, float32x2_t arg_f32x2, float32x4_t arg_f32x4) {100	vmul_lane_f32(arg_f32x2, arg_f32x2, 0);101	vmul_lane_f32(arg_f32x2, arg_f32x2, 1);102	vmul_lane_f32(arg_f32x2, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}103	vmul_lane_f32(arg_f32x2, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}104 105	vmulq_lane_f32(arg_f32x4, arg_f32x2, 0);106	vmulq_lane_f32(arg_f32x4, arg_f32x2, 1);107	vmulq_lane_f32(arg_f32x4, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}108	vmulq_lane_f32(arg_f32x4, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}109 110	vmuls_lane_f32(arg_f32, arg_f32x2, 0);111	vmuls_lane_f32(arg_f32, arg_f32x2, 1);112	vmuls_lane_f32(arg_f32, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}113	vmuls_lane_f32(arg_f32, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}114 115	vmul_laneq_f32(arg_f32x2, arg_f32x4, 0);116	vmul_laneq_f32(arg_f32x2, arg_f32x4, 3);117	vmul_laneq_f32(arg_f32x2, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}118	vmul_laneq_f32(arg_f32x2, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}119 120	vmulq_laneq_f32(arg_f32x4, arg_f32x4, 0);121	vmulq_laneq_f32(arg_f32x4, arg_f32x4, 3);122	vmulq_laneq_f32(arg_f32x4, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}123	vmulq_laneq_f32(arg_f32x4, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}124 125	vmuls_laneq_f32(arg_f32, arg_f32x4, 0);126	vmuls_laneq_f32(arg_f32, arg_f32x4, 3);127	vmuls_laneq_f32(arg_f32, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}128	vmuls_laneq_f32(arg_f32, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}129 130}131 132void test_vector_multiply_by_scalar_f64(float64x1_t arg_f64x1, float64_t arg_f64, float64x2_t arg_f64x2) {133	vmul_lane_f64(arg_f64x1, arg_f64x1, 0);134	vmul_lane_f64(arg_f64x1, arg_f64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}135	vmul_lane_f64(arg_f64x1, arg_f64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}136 137	vmulq_lane_f64(arg_f64x2, arg_f64x1, 0);138	vmulq_lane_f64(arg_f64x2, arg_f64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}139	vmulq_lane_f64(arg_f64x2, arg_f64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}140 141	vmuld_lane_f64(arg_f64, arg_f64x1, 0);142	vmuld_lane_f64(arg_f64, arg_f64x1, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}143	vmuld_lane_f64(arg_f64, arg_f64x1, 1); // expected-error-re {{argument value {{.*}} is outside the valid range}}144 145	vmul_laneq_f64(arg_f64x1, arg_f64x2, 0);146	vmul_laneq_f64(arg_f64x1, arg_f64x2, 1);147	vmul_laneq_f64(arg_f64x1, arg_f64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}148	vmul_laneq_f64(arg_f64x1, arg_f64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}149 150	vmulq_laneq_f64(arg_f64x2, arg_f64x2, 0);151	vmulq_laneq_f64(arg_f64x2, arg_f64x2, 1);152	vmulq_laneq_f64(arg_f64x2, arg_f64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}153	vmulq_laneq_f64(arg_f64x2, arg_f64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}154 155	vmuld_laneq_f64(arg_f64, arg_f64x2, 0);156	vmuld_laneq_f64(arg_f64, arg_f64x2, 1);157	vmuld_laneq_f64(arg_f64, arg_f64x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}158	vmuld_laneq_f64(arg_f64, arg_f64x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}159 160}161