[clang] [llvm] [SystemZ] Support fp16 vector ABI and basic codegen. (PR #171066)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 05:15:09 PST 2026


================
@@ -842,6 +846,42 @@ bool SystemZTargetLowering::useSoftFloat() const {
   return Subtarget.hasSoftFloat();
 }
 
+unsigned SystemZTargetLowering::getVectorTypeBreakdownForCallingConv(
+      LLVMContext &Context, CallingConv::ID CC, EVT VT, EVT &IntermediateVT,
+      unsigned &NumIntermediates, MVT &RegisterVT) const {
+  // Pass fp16 vectors in VR(s).
+  if (Subtarget.hasVector() && VT.isVector() && VT.getScalarType() == MVT::f16) {
+    IntermediateVT = RegisterVT = MVT::v8f16;
+    return NumIntermediates = divideCeil(VT.getVectorNumElements(),
+                                         SystemZ::VectorBytes / 2);
+  }
----------------
arsenm wrote:

Do you really need this? I would expect you get this by default? 

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


More information about the cfe-commits mailing list