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

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 25 09:12:47 PST 2025


================
@@ -10527,6 +10527,21 @@ bool ASTContext::areCompatibleVectorTypes(QualType FirstVec,
       Second->getVectorKind() != VectorKind::RVVFixedLengthMask_4)
     return true;
 
+  // In OpenCL, treat half and _Float16 vector types as compatible.
----------------
shiltian wrote:

I'd move this part to a RFC PR, and add more OpenCL folks (outside of AMD) to review. I think this change needs more prudent review. After that is merged, we can just do a simple NFC change here.

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


More information about the cfe-commits mailing list