[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 28 00:23:07 PDT 2022
pengfei created this revision.
pengfei added reviewers: RKSimon, ldionne, bkramer.
Herald added a project: All.
pengfei requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
GCC folks decided to make the mangling of __bf16 the same as std::bfloat16_t.
We need to match with GCC: https://godbolt.org/z/jjne5qxPa
Other targets may still use their own mangling way.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136919
Files:
clang/lib/Basic/Targets/X86.h
clang/test/CodeGen/X86/bfloat-mangle.cpp
Index: clang/test/CodeGen/X86/bfloat-mangle.cpp
===================================================================
--- clang/test/CodeGen/X86/bfloat-mangle.cpp
+++ clang/test/CodeGen/X86/bfloat-mangle.cpp
@@ -3,6 +3,6 @@
// RUN: %clang_cc1 -triple i386-windows-msvc -target-feature +sse2 -emit-llvm -o - %s | FileCheck %s --check-prefixes=WINDOWS
// RUN: %clang_cc1 -triple x86_64-windows-msvc -target-feature +sse2 -emit-llvm -o - %s | FileCheck %s --check-prefixes=WINDOWS
-// LINUX: define {{.*}}void @_Z3foou6__bf16(bfloat noundef %b)
+// LINUX: define {{.*}}void @_Z3fooDF16b(bfloat noundef %b)
// WINDOWS: define {{.*}}void @"?foo@@YAXU__bf16 at __clang@@@Z"(bfloat noundef %b)
void foo(__bf16 b) {}
Index: clang/lib/Basic/Targets/X86.h
===================================================================
--- clang/lib/Basic/Targets/X86.h
+++ clang/lib/Basic/Targets/X86.h
@@ -410,7 +410,7 @@
return getPointerWidthV(AddrSpace);
}
- const char *getBFloat16Mangling() const override { return "u6__bf16"; };
+ const char *getBFloat16Mangling() const override { return "DF16b"; };
};
// X86-32 generic target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136919.471420.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221028/89ac97df/attachment.bin>
More information about the cfe-commits
mailing list