Skip to content

Commit df1fe8e

Browse files
committed
[Clang][TableGen] Add missing __bf16 type to the builtins parser
The Clang tablegen built-in function prototype parser has the `__bf16` type missing. This patch adds the missing type to the parser.
1 parent 3d29751 commit df1fe8e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clang/test/TableGen/target-builtins-prototype-parser.td

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ def : Builtin {
5757
let Spellings = ["__builtin_08"];
5858
}
5959

60+
def : Builtin {
61+
// CHECK: BUILTIN(__builtin_09, "V2yy", "")
62+
let Prototype = "_Vector<2, __bf16>(__bf16)";
63+
let Spellings = ["__builtin_09"];
64+
}
65+
6066
#ifdef ERROR_EXPECTED_LANES
6167
def : Builtin {
6268
// ERROR_EXPECTED_LANES: :[[# @LINE + 1]]:7: error: Expected number of lanes after '_ExtVector<'
@@ -112,4 +118,3 @@ def : Builtin {
112118
let Spellings = ["__builtin_test_use_clang_extended_vectors"];
113119
}
114120
#endif
115-

clang/utils/TableGen/ClangBuiltinsEmitter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class PrototypeParser {
155155
.Case("__fp16", "h")
156156
.Case("__int128_t", "LLLi")
157157
.Case("_Float16", "x")
158+
.Case("__bf16", "y")
158159
.Case("bool", "b")
159160
.Case("char", "c")
160161
.Case("constant_CFString", "F")

0 commit comments

Comments
 (0)