Author: Rana Pratap Reddy
Date: 2025-12-10T13:12:12+05:30
New Revision: 43f0b6960e1816d1c1c5ec04ee2bc8c5638fb4e0

URL: 
https://github.com/llvm/llvm-project/commit/43f0b6960e1816d1c1c5ec04ee2bc8c5638fb4e0
DIFF: 
https://github.com/llvm/llvm-project/commit/43f0b6960e1816d1c1c5ec04ee2bc8c5638fb4e0.diff

LOG: [AMDGPU] Removal of language sensitive option for _Float16 and half('e') 
handling (#170443)

Removing the 'e' handling for the amdgcn builtins as we decided to use
_Float16 for both HIP/C++ and OpenCL

Added: 
    

Modified: 
    clang/include/clang/Basic/Builtins.def
    clang/lib/AST/ASTContext.cpp

Removed: 
    


################################################################################
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'!");


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to