brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.7 KiB · a7eee3a Raw
201 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 6void test_vector_multiply_accumulate_by_scalar_s16(int32x4_t arg_i32x4, int16x8_t arg_i16x8, int16x4_t arg_i16x4) {7	vmla_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 0);8	vmla_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 3);9	vmla_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}10	vmla_lane_s16(arg_i16x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}11 12	vmlaq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 0);13	vmlaq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 3);14	vmlaq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}15	vmlaq_lane_s16(arg_i16x8, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}16 17	vmla_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 0);18	vmla_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 7);19	vmla_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}20	vmla_laneq_s16(arg_i16x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}21 22	vmlaq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 0);23	vmlaq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 7);24	vmlaq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}25	vmlaq_laneq_s16(arg_i16x8, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}26 27	vmlal_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 0);28	vmlal_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 3);29	vmlal_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}30	vmlal_lane_s16(arg_i32x4, arg_i16x4, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}31 32	vmlal_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 0);33	vmlal_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 3);34	vmlal_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}35	vmlal_high_lane_s16(arg_i32x4, arg_i16x8, arg_i16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}36 37	vmlal_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 0);38	vmlal_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 7);39	vmlal_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}40	vmlal_laneq_s16(arg_i32x4, arg_i16x4, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}41 42	vmlal_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 0);43	vmlal_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 7);44	vmlal_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}45	vmlal_high_laneq_s16(arg_i32x4, arg_i16x8, arg_i16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}46 47}48 49void test_vector_multiply_accumulate_by_scalar_s32(int32x4_t arg_i32x4, int32x2_t arg_i32x2, int64x2_t arg_i64x2) {50	vmla_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 0);51	vmla_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 1);52	vmla_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}53	vmla_lane_s32(arg_i32x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}54 55	vmlaq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 0);56	vmlaq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 1);57	vmlaq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}58	vmlaq_lane_s32(arg_i32x4, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}59 60	vmla_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 0);61	vmla_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 3);62	vmla_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}63	vmla_laneq_s32(arg_i32x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}64 65	vmlaq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 0);66	vmlaq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 3);67	vmlaq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}68	vmlaq_laneq_s32(arg_i32x4, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}69 70	vmlal_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 0);71	vmlal_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 1);72	vmlal_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}73	vmlal_lane_s32(arg_i64x2, arg_i32x2, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}74 75	vmlal_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 0);76	vmlal_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 1);77	vmlal_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}78	vmlal_high_lane_s32(arg_i64x2, arg_i32x4, arg_i32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}79 80	vmlal_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 0);81	vmlal_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 3);82	vmlal_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}83	vmlal_laneq_s32(arg_i64x2, arg_i32x2, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}84 85	vmlal_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 0);86	vmlal_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 3);87	vmlal_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}88	vmlal_high_laneq_s32(arg_i64x2, arg_i32x4, arg_i32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}89 90}91 92void test_vector_multiply_accumulate_by_scalar_u16(uint16x4_t arg_u16x4, uint16x8_t arg_u16x8, uint32x4_t arg_u32x4) {93	vmla_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 0);94	vmla_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 3);95	vmla_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}96	vmla_lane_u16(arg_u16x4, arg_u16x4, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}97 98	vmlaq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 0);99	vmlaq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 3);100	vmlaq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}101	vmlaq_lane_u16(arg_u16x8, arg_u16x8, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}102 103	vmla_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 0);104	vmla_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 7);105	vmla_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}106	vmla_laneq_u16(arg_u16x4, arg_u16x4, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}107 108	vmlaq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 0);109	vmlaq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 7);110	vmlaq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}111	vmlaq_laneq_u16(arg_u16x8, arg_u16x8, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}112 113	vmlal_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 0);114	vmlal_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 3);115	vmlal_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}116	vmlal_lane_u16(arg_u32x4, arg_u16x4, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}117 118	vmlal_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 0);119	vmlal_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 3);120	vmlal_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}121	vmlal_high_lane_u16(arg_u32x4, arg_u16x8, arg_u16x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}122 123	vmlal_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 0);124	vmlal_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 7);125	vmlal_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}126	vmlal_laneq_u16(arg_u32x4, arg_u16x4, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}127 128	vmlal_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 0);129	vmlal_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 7);130	vmlal_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}131	vmlal_high_laneq_u16(arg_u32x4, arg_u16x8, arg_u16x8, 8); // expected-error-re {{argument value {{.*}} is outside the valid range}}132 133}134 135void test_vector_multiply_accumulate_by_scalar_u32(uint64x2_t arg_u64x2, uint32x2_t arg_u32x2, uint32x4_t arg_u32x4) {136	vmla_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 0);137	vmla_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 1);138	vmla_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}139	vmla_lane_u32(arg_u32x2, arg_u32x2, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}140 141	vmlaq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 0);142	vmlaq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 1);143	vmlaq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}144	vmlaq_lane_u32(arg_u32x4, arg_u32x4, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}145 146	vmla_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 0);147	vmla_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 3);148	vmla_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}149	vmla_laneq_u32(arg_u32x2, arg_u32x2, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}150 151	vmlaq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 0);152	vmlaq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 3);153	vmlaq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}154	vmlaq_laneq_u32(arg_u32x4, arg_u32x4, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}155 156	vmlal_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 0);157	vmlal_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 1);158	vmlal_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}159	vmlal_lane_u32(arg_u64x2, arg_u32x2, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}160 161	vmlal_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 0);162	vmlal_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 1);163	vmlal_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}164	vmlal_high_lane_u32(arg_u64x2, arg_u32x4, arg_u32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}165 166	vmlal_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 0);167	vmlal_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 3);168	vmlal_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}169	vmlal_laneq_u32(arg_u64x2, arg_u32x2, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}170 171	vmlal_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 0);172	vmlal_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 3);173	vmlal_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}174	vmlal_high_laneq_u32(arg_u64x2, arg_u32x4, arg_u32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}175 176}177 178void test_vector_multiply_accumulate_by_scalar_f32(float32x4_t arg_f32x4, float32x2_t arg_f32x2) {179	vmla_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 0);180	vmla_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 1);181	vmla_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}182	vmla_lane_f32(arg_f32x2, arg_f32x2, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}183 184	vmlaq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 0);185	vmlaq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 1);186	vmlaq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}187	vmlaq_lane_f32(arg_f32x4, arg_f32x4, arg_f32x2, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}188 189	vmla_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 0);190	vmla_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 3);191	vmla_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}192	vmla_laneq_f32(arg_f32x2, arg_f32x2, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}193 194	vmlaq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 0);195	vmlaq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 3);196	vmlaq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}197	vmlaq_laneq_f32(arg_f32x4, arg_f32x4, arg_f32x4, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}198 199}200 201