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

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 19 05:49:26 PST 2024


================
@@ -91,11 +91,28 @@ class LLVM_LIBRARY_VISIBILITY SystemZTargetInfo : public TargetInfo {
                       "-v128:64-a:8:16-n32:64");
     }
     MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 128;
+
+    // True if the backend supports operations on the half LLVM IR type.
+    // By setting this to false, conversions will happen for _Float16 around
+    // a statement by default, with operations done in float. However, if
+    // -ffloat16-excess-precision=none is given, no conversions will be made
+    // and instead the backend will promote each half operation to float
+    // individually.
+    HasLegalHalfType = false;
+    // Allow half arguments and return values (__fp16).
+    HalfArgsAndReturns = true;
----------------
uweigand wrote:

I don't think we should support this, this looks like a ARM-only feature.  It's false on Intel as well.

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


More information about the cfe-commits mailing list