[PATCH] D75169: [ARM] Enforcing calling convention for half-precision FP arguments and returns for big-endian AArch32

Lucas Prates via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 13:52:09 PDT 2020


pratlucas updated this revision to Diff 269343.
pratlucas added a comment.
Herald added subscribers: llvm-commits, dmgreen, hiraditya.
Herald added a project: LLVM.

Re-writing the handling of fp16 arguments, moving their lowering to be performed
in the backend.

This removes the necesity of coercing the arguments in clang and allows the
backend to have full control over how those arguments should be lowered according
to each calling convention.

To achieve this, a couple of new hooks had to be introduced to allow the target
to have a say on how an argument value should be split or combined together into
a legal type.

There are still two tests failing - one due to the lack of support for the fp16
handling in the GlobalISel flow and one due to an issue lowering the result of
an fp_round library call - but I would like to start getting feedback while 
I work on the fix for those.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75169

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/TargetInfo.cpp
  clang/test/CodeGen/arm-fp16-arguments.c
  clang/test/CodeGen/arm-mve-intrinsics/compare.c
  clang/test/CodeGen/arm-mve-intrinsics/cplusplus.cpp
  clang/test/CodeGen/arm-mve-intrinsics/dup.c
  clang/test/CodeGen/arm-mve-intrinsics/get-set-lane.c
  clang/test/CodeGen/arm-mve-intrinsics/ternary.c
  clang/test/CodeGen/arm-mve-intrinsics/vaddq.c
  clang/test/CodeGen/arm-mve-intrinsics/vminvq.c
  clang/test/CodeGen/arm-mve-intrinsics/vmulq.c
  clang/test/CodeGen/arm-mve-intrinsics/vsubq.c
  clang/test/CodeGen/cmse-clear-fp16.c
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/Target/ARM/ARMCallingConv.cpp
  llvm/lib/Target/ARM/ARMCallingConv.td
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.h
  llvm/test/CodeGen/ARM/fp16-args.ll
  llvm/test/CodeGen/ARM/fp16-bitcast.ll
  llvm/test/CodeGen/ARM/fp16-promote.ll
  llvm/test/CodeGen/ARM/fp16-vminmaxnm-safe.ll
  llvm/test/CodeGen/ARM/vecreduce-fadd-legalization-strict.ll
  llvm/test/CodeGen/ARM/vecreduce-fmul-legalization-strict.ll
  llvm/test/CodeGen/Thumb2/mve-shuffle.ll
  llvm/test/CodeGen/Thumb2/mve-vdup.ll
  llvm/test/CodeGen/Thumb2/mve-vecreduce-fminmax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75169.269343.patch
Type: text/x-patch
Size: 130712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200608/845860b7/attachment-0001.bin>


More information about the cfe-commits mailing list