[PATCH] D82443: [ARM] Narrowing half-precision lowering to supported CCs

Lucas Prates via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 09:43:05 PDT 2020


pratlucas added a comment.

It seems most of the argument lowering convertions get simplifyed on the regular case, when not using `fastcc`.
When using it, though, type legalization ends up trying to handle a `i16 = bitcast ConstantFP:f16<APFloat(0)>` node, turning it into an `i32 <- f32` operation and getting lost while trying to create the new constant.

Avoiding the splitting should do the trick for `fastcc`, as it has no need to conform with AAPCS. I'm not sure about `swiftcc`, though, as it is expected to comply with AAPCS-VFP on ios platforms according to LLVM's language reference manual.



================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:4159
+    IsABIRegCopy =
+        (CCVal == CallingConv::ARM_APCS || CCVal == CallingConv::ARM_AAPCS);
+  }
----------------
`CallingConv::ARM_AAPCS_VFP` and `CallingConv::C` would also need to be included here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82443/new/

https://reviews.llvm.org/D82443





More information about the llvm-commits mailing list