================ @@ -2616,6 +2617,13 @@ bool Sema::IsFloatingPointPromotion(QualType FromType, QualType ToType) { ToBuiltin->getKind() == BuiltinType::Ibm128)) return true; + // In HLSL, `half` promotes to `float` or `double`, regardless of whether + // or not native half types are enabled. ---------------- llvm-beanz wrote:
There is a difference between the IR and language types. `half` is always `half` in the language, which is always a different type form `float`. This behavior is consistent in earlier language modes and with 202x: https://godbolt.org/z/3bzoocdrG When you don't pass `-enable-16bit-types`, `half` is 32-bit and conforms to the IEEE single-precision fp32 representation (see: https://github.com/llvm/llvm-project/pull/90694). https://github.com/llvm/llvm-project/pull/90222 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits