1
1
// RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
2
2
// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
3
3
// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64
4
+ // RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -target-feature +bf16 %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64-BF16
4
5
5
6
typedef float float32_t ;
6
7
typedef double float64_t ;
@@ -14,6 +15,10 @@ typedef short poly16_t;
14
15
#endif
15
16
typedef unsigned __INT64_TYPE__ uint64_t ;
16
17
18
+ #if defined(__ARM_FEATURE_BF16)
19
+ typedef __bf16 bfloat16_t ;
20
+ #endif
21
+
17
22
typedef __attribute__ ((neon_vector_type(2 ))) int int32x2_t;
18
23
typedef __attribute__ ((neon_vector_type(4 ))) int int32x4_t;
19
24
typedef __attribute__ ((neon_vector_type(1 ))) uint64_t uint64x1_t;
@@ -28,6 +33,10 @@ typedef __attribute__((neon_vector_type(2))) float64_t float64x2_t;
28
33
typedef __attribute__ ((neon_polyvector_type(16 ))) poly8_t poly8x16_t;
29
34
typedef __attribute__ ((neon_polyvector_type(8 ))) poly16_t poly16x8_t;
30
35
36
+ #if defined(__ARM_FEATURE_BF16)
37
+ typedef __attribute__ ((neon_vector_type(4 ))) __bf16 bfloat16x4_t;
38
+ #endif
39
+
31
40
// CHECK: 16__simd64_int32_t
32
41
// CHECK-AARCH64: 11__Int32x2_t
33
42
void f1 (int32x2_t v) { }
@@ -72,3 +81,8 @@ void f10(poly16x8_t v) {}
72
81
// CHECK-AARCH64: 13__Float64x2_t
73
82
void f11 (float64x2_t v) { }
74
83
#endif
84
+
85
+ #if defined(__ARM_FEATURE_BF16)
86
+ // CHECK-AARCH64-BF16: 14__Bfloat16x4_t
87
+ void f12 (bfloat16x4_t v) {}
88
+ #endif
0 commit comments