[clang] [AMDGPU] Modifies builtin def to take _Float16('x') for both HIP/C++ and for OpenCL (PR #167652)

Rana Pratap Reddy via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 10:38:19 PST 2025


================
@@ -5,7 +5,7 @@
 
 typedef int int4 __attribute__((ext_vector_type(4)));
 typedef float float4 __attribute__((ext_vector_type(4)));
-typedef half half4 __attribute__((ext_vector_type(4)));
+typedef _Float16 half4 __attribute__((ext_vector_type(4)));
----------------
ranapratap55 wrote:

Added code to treat _Float16 same as half. With this change "half" in OpenCL the conversion working fine.

https://github.com/llvm/llvm-project/pull/167652


More information about the cfe-commits mailing list