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

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 11:21:59 PDT 2020


plotfi added a comment.

In D82443#2111882 <https://reviews.llvm.org/D82443#2111882>, @pratlucas wrote:

> 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.


I gave the following a try, and it also asserts:

  target datalayout = "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
  target triple = "thumbv7s-apple-ios7.0.0"
  
  define arm_aapcs_vfpcc { <8 x half>, <8 x half> } @f() {
    ret { <8 x half>, <8 x half> } zeroinitializer
  }


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