Skip to content

Commit d9c439b

Browse files
author
git apple-llvm automerger
committed
Merge commit 'bff8d98129e8' from llvm.org/release/11.x into apple/stable/20200714
2 parents 0bf9a7b + bff8d98 commit d9c439b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

clang/lib/AST/ItaniumMangle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3251,7 +3251,7 @@ static StringRef mangleAArch64VectorBase(const BuiltinType *EltType) {
32513251
case BuiltinType::Double:
32523252
return "Float64";
32533253
case BuiltinType::BFloat16:
3254-
return "BFloat16";
3254+
return "Bfloat16";
32553255
default:
32563256
llvm_unreachable("Unexpected vector element base type");
32573257
}

clang/test/CodeGenCXX/mangle-neon-vectors.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
22
// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
33
// 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
45

56
typedef float float32_t;
67
typedef double float64_t;
@@ -14,6 +15,10 @@ typedef short poly16_t;
1415
#endif
1516
typedef unsigned __INT64_TYPE__ uint64_t;
1617

18+
#if defined(__ARM_FEATURE_BF16)
19+
typedef __bf16 bfloat16_t;
20+
#endif
21+
1722
typedef __attribute__((neon_vector_type(2))) int int32x2_t;
1823
typedef __attribute__((neon_vector_type(4))) int int32x4_t;
1924
typedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t;
@@ -28,6 +33,10 @@ typedef __attribute__((neon_vector_type(2))) float64_t float64x2_t;
2833
typedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t;
2934
typedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t;
3035

36+
#if defined(__ARM_FEATURE_BF16)
37+
typedef __attribute__((neon_vector_type(4))) __bf16 bfloat16x4_t;
38+
#endif
39+
3140
// CHECK: 16__simd64_int32_t
3241
// CHECK-AARCH64: 11__Int32x2_t
3342
void f1(int32x2_t v) { }
@@ -72,3 +81,8 @@ void f10(poly16x8_t v) {}
7281
// CHECK-AARCH64: 13__Float64x2_t
7382
void f11(float64x2_t v) { }
7483
#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

Comments
 (0)