[clang] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 04:26:01 PDT 2024


================
@@ -16534,7 +16534,7 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
           PromoteType = QualType();
       }
     }
-    if (TInfo->getType()->isSpecificBuiltinType(BuiltinType::Float))
+    if (TInfo->getType()->isFloat16Type() || TInfo->getType()->isFloat32Type())
----------------
uweigand wrote:

Why add this promotion rule?   This seems to directly contradict the specification here: https://clang.llvm.org/docs/LanguageExtensions.html

>Because default argument promotion only applies to the standard floating-point types, _Float16 values are not promoted to double when passed as variadic or untyped arguments.


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


More information about the llvm-commits mailing list