[PATCH] D142703: [ARM] Allow selecting the hard float ABI in integer-only MVE. r=MaskRay,dmgreen,efriedma,john.brawn,lenary,ostannard

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 03:46:01 PST 2023


simon_tatham created this revision.
simon_tatham added reviewers: MaskRay, dmgreen, efriedma, john.brawn, lenary, ostannard.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
simon_tatham requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Armv8.1-M can be configured to support the integer subset of the MVE
vector instructions, and no floating point. In that situation, the FP
and vector registers still exist, and so do the load, store and move
instructions that transfer data in and out of them. So there's no
reason the hard floating point ABI can't be supported, and you might
reasonably want to use it, for the sake of intrinsics-based code
passing explicit MVE vector types between functions.

But the selection of the hard float ABI in the backend was gated on
Subtarget->hasVFP2Base(), which is false in the case of integer MVE
and no FP.

As a result, you'd silently get the soft float ABI even if you
deliberately tried to select it, e.g. with clang options such as
--target=arm-none-eabi -mfloat-abi=hard -march=armv8.1m.main+nofp+mve

The hard float ABI should have been gated on the weaker condition
Subtarget->hasFPRegs(), because the only requirement for being able to
pass arguments in the FP registers is that the registers themselves
should exist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142703

Files:
  llvm/lib/Target/ARM/ARMFastISel.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/Thumb2/float-ops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142703.492696.patch
Type: text/x-patch
Size: 4156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/a898e099/attachment.bin>


More information about the llvm-commits mailing list