[clang] [AMDGPU] Removal of language sensitive option for _Float16 and half('e') handling (PR #170443)
Rana Pratap Reddy via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 9 21:46:50 PST 2025
https://github.com/ranapratap55 updated https://github.com/llvm/llvm-project/pull/170443
>From 84e4a4c5b2fa1bbfed9484bdf6e6043f5d0c9a93 Mon Sep 17 00:00:00 2001
From: ranapratap55 <RanaPratapReddy.Nimmakayala at amd.com>
Date: Wed, 3 Dec 2025 14:48:30 +0530
Subject: [PATCH] [AMDGPU] Removal of language sensitive option for _Float16
and half( 'e') handling
---
clang/include/clang/Basic/Builtins.def | 1 -
clang/lib/AST/ASTContext.cpp | 8 ++------
2 files changed, 2 insertions(+), 7 deletions(-)
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 13018ba8de7e7..f4aadeceb4bb7 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -12417,12 +12417,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'!");
More information about the cfe-commits
mailing list