[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


================
@@ -1597,6 +1618,15 @@ bool SystemZTargetLowering::splitValueIntoRegisterParts(
     return true;
   }
 
+  // Convert f16 to f32 (Out-arg).
+  if (PartVT == MVT::f16) {
+    assert(NumParts == 1 && "");
+    SDValue I16Val = DAG.getBitcast(MVT::i16, Val);
+    SDValue I32Val = DAG.getAnyExtOrTrunc(I16Val, DL, MVT::i32);
----------------
uweigand wrote:

Doesn't this place the f16 into the *low* bytes of the f32, rather than the high bytes?

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


More information about the llvm-commits mailing list