-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[AMDGPU] Removal of language sensitive option for _Float16 and half('e') handling #170443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🐧 Linux x64 Test Results
Failed Tests(click on a test name to see its output) ClangClang.CodeGen/builtins-extended-image.cClang.SemaOpenCL/builtins-extended-image-param-gfx1100-err.clClang.SemaOpenCL/builtins-extended-image-param-gfx942-err.clIf these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the |
|
@llvm/pr-subscribers-clang Author: Rana Pratap Reddy (ranapratap55) ChangesRemoving the 'e' handling for the amdgcn builtins as we decided to use _Float16 for both HIP/C++ and OpenCL Full diff: https://github.com/llvm/llvm-project/pull/170443.diff 2 Files Affected:
diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def
index 3a5b72e20afab..b856ad145824d 100644
--- a/clang/include/clang/Basic/Builtins.def
+++ b/clang/include/clang/Basic/Builtins.def
@@ -43,7 +43,6 @@
// SJ -> sigjmp_buf
// K -> ucontext_t
// p -> pid_t
-// e -> _Float16 for HIP/C++ and __fp16 for OpenCL
// . -> "...". This may only occur at the end of the function list.
//
// Types may be prefixed with the following modifiers:
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index b359fc8350375..a04dcabdaa6b6 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -12402,12 +12402,8 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
// Read the base type.
switch (*Str++) {
- default: llvm_unreachable("Unknown builtin type letter!");
- case 'e':
- assert(HowLong == 0 && !Signed && !Unsigned &&
- "Bad modifiers used with 'e'!");
- Type = Context.getLangOpts().OpenCL ? Context.HalfTy : Context.Float16Ty;
- break;
+ default:
+ llvm_unreachable("Unknown builtin type letter!");
case 'x':
assert(HowLong == 0 && !Signed && !Unsigned &&
"Bad modifiers used with 'x'!");
|
Removing the 'e' handling for the amdgcn builtins as we decided to use _Float16 for both HIP/C++ and OpenCL