Debian Codegraph @

clang/test/Sema/aarch64-neon-immediate-ranges/dotprod.c

raw
1 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -target-feature +v8.2a -target-feature +dotprod -ffreestanding -fsyntax-only -verify %s
2
3 #include <arm_neon.h>
4 // REQUIRES: aarch64-registered-target
5
6 void test_dot_product_u32(uint8x8_t arg_u8x8, uint32x2_t arg_u32x2, uint8x16_t arg_u8x16, uint32x4_t arg_u32x4) {
7 vdot_lane_u32(arg_u32x2, arg_u8x8, arg_u8x8, 0);
8 vdot_lane_u32(arg_u32x2, arg_u8x8, arg_u8x8, 1);
9 vdot_lane_u32(arg_u32x2, arg_u8x8, arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
10 vdot_lane_u32(arg_u32x2, arg_u8x8, arg_u8x8, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
11
12 vdotq_laneq_u32(arg_u32x4, arg_u8x16, arg_u8x16, 0);
13 vdotq_laneq_u32(arg_u32x4, arg_u8x16, arg_u8x16, 3);
14 vdotq_laneq_u32(arg_u32x4, arg_u8x16, arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
15 vdotq_laneq_u32(arg_u32x4, arg_u8x16, arg_u8x16, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
16
17 vdot_laneq_u32(arg_u32x2, arg_u8x8, arg_u8x16, 0);
18 vdot_laneq_u32(arg_u32x2, arg_u8x8, arg_u8x16, 3);
19 vdot_laneq_u32(arg_u32x2, arg_u8x8, arg_u8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
20 vdot_laneq_u32(arg_u32x2, arg_u8x8, arg_u8x16, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
21
22 vdotq_lane_u32(arg_u32x4, arg_u8x16, arg_u8x8, 0);
23 vdotq_lane_u32(arg_u32x4, arg_u8x16, arg_u8x8, 1);
24 vdotq_lane_u32(arg_u32x4, arg_u8x16, arg_u8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
25 vdotq_lane_u32(arg_u32x4, arg_u8x16, arg_u8x8, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
26
27 }
28
29 void test_dot_product_s32(int32x2_t arg_i32x2, int8x16_t arg_i8x16, int8x8_t arg_i8x8, int32x4_t arg_i32x4) {
30 vdot_lane_s32(arg_i32x2, arg_i8x8, arg_i8x8, 0);
31 vdot_lane_s32(arg_i32x2, arg_i8x8, arg_i8x8, 1);
32 vdot_lane_s32(arg_i32x2, arg_i8x8, arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
33 vdot_lane_s32(arg_i32x2, arg_i8x8, arg_i8x8, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
34
35 vdotq_laneq_s32(arg_i32x4, arg_i8x16, arg_i8x16, 0);
36 vdotq_laneq_s32(arg_i32x4, arg_i8x16, arg_i8x16, 3);
37 vdotq_laneq_s32(arg_i32x4, arg_i8x16, arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
38 vdotq_laneq_s32(arg_i32x4, arg_i8x16, arg_i8x16, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
39
40 vdot_laneq_s32(arg_i32x2, arg_i8x8, arg_i8x16, 0);
41 vdot_laneq_s32(arg_i32x2, arg_i8x8, arg_i8x16, 3);
42 vdot_laneq_s32(arg_i32x2, arg_i8x8, arg_i8x16, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
43 vdot_laneq_s32(arg_i32x2, arg_i8x8, arg_i8x16, 4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
44
45 vdotq_lane_s32(arg_i32x4, arg_i8x16, arg_i8x8, 0);
46 vdotq_lane_s32(arg_i32x4, arg_i8x16, arg_i8x8, 1);
47 vdotq_lane_s32(arg_i32x4, arg_i8x16, arg_i8x8, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
48 vdotq_lane_s32(arg_i32x4, arg_i8x16, arg_i8x8, 2); // expected-error-re {{argument value {{.*}} is outside the valid range}}
49
50 }