File: aarch64-bf16-ldst-intrinsics.c

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (104 lines) | stat: -rw-r--r-- 6,571 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// RUN: %clang_cc1 -triple aarch64 -target-feature +neon -target-feature +bf16 \
// RUN:  -O2 -verify -fsyntax-only %s

// REQUIRES: aarch64-registered-target || arm-registered-target

#include "arm_neon.h"

int x;

bfloat16x4_t test_vld1_lane_bf16(bfloat16_t const *ptr, bfloat16x4_t src) {
  (void)vld1_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld1_lane_bf16(ptr, src, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld1_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x8_t test_vld1q_lane_bf16(bfloat16_t const *ptr, bfloat16x8_t src) {
  (void)vld1q_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld1q_lane_bf16(ptr, src, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld1q_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x4x2_t test_vld2_lane_bf16(bfloat16_t const *ptr, bfloat16x4x2_t src) {
  (void)vld2_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld2_lane_bf16(ptr, src, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld2_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x8x2_t test_vld2q_lane_bf16(bfloat16_t const *ptr, bfloat16x8x2_t src) {
  (void)vld2q_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld2q_lane_bf16(ptr, src, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld2q_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x4x3_t test_vld3_lane_bf16(bfloat16_t const *ptr, bfloat16x4x3_t src) {
  (void)vld3_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld3_lane_bf16(ptr, src, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld3_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x8x3_t test_vld3q_lane_bf16(bfloat16_t const *ptr, bfloat16x8x3_t src) {
  (void)vld3q_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld3q_lane_bf16(ptr, src, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld3q_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x4x4_t test_vld4_lane_bf16(bfloat16_t const *ptr, bfloat16x4x4_t src) {
  (void)vld4_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld4_lane_bf16(ptr, src, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld4_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

bfloat16x8x4_t test_vld4q_lane_bf16(bfloat16_t const *ptr, bfloat16x8x4_t src) {
  (void)vld4q_lane_bf16(ptr, src, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  (void)vld4q_lane_bf16(ptr, src, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  return vld4q_lane_bf16(ptr, src, x); // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst1_lane_bf16(bfloat16_t *ptr, bfloat16x4_t val) {
  vst1_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst1_lane_bf16(ptr, val, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst1_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst1q_lane_bf16(bfloat16_t *ptr, bfloat16x8_t val) {
  vst1q_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst1q_lane_bf16(ptr, val, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst1q_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst2_lane_bf16(bfloat16_t *ptr, bfloat16x4x2_t val) {
  vst2_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst2_lane_bf16(ptr, val, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst2_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst2q_lane_bf16(bfloat16_t *ptr, bfloat16x8x2_t val) {
  vst2q_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst2q_lane_bf16(ptr, val, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst2q_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst3_lane_bf16(bfloat16_t *ptr, bfloat16x4x3_t val) {
  vst3_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst3_lane_bf16(ptr, val, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst3_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst3q_lane_bf16(bfloat16_t *ptr, bfloat16x8x3_t val) {
  vst3q_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst3q_lane_bf16(ptr, val, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst3q_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst4_lane_bf16(bfloat16_t *ptr, bfloat16x4x4_t val) {
  vst4_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst4_lane_bf16(ptr, val, 4);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst4_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}

void test_vst4q_lane_bf16(bfloat16_t *ptr, bfloat16x8x4_t val) {
  vst4q_lane_bf16(ptr, val, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst4q_lane_bf16(ptr, val, 8);  // expected-error-re {{argument value {{.*}} is outside the valid range}}
  vst4q_lane_bf16(ptr, val, x);  // expected-error-re {{argument {{.*}} must be a constant integer}}
}