This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Support fp16/bf16 using t constraint
ClosedPublic

Authored by lenary on Sep 23 2022, 10:41 AM.

Details

Summary

fp16 and bf16 values can be used in GCC's inline assembly using the "t"
constraint, which means "VFP floating-point registers s0-s31" - fp16 and
bf16 values are stored in S registers too.

This change ensures that LLVM is compatible with GCC for programs that
use fp16 and the 't' constraint.

Fixes #57753

Diff Detail

Event Timeline

lenary created this revision.Sep 23 2022, 10:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 10:41 AM
lenary requested review of this revision.Sep 23 2022, 10:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2022, 10:41 AM
This revision is now accepted and ready to land.Sep 26 2022, 1:29 AM
DavidSpickett accepted this revision.Sep 26 2022, 1:46 AM

LGTM.

Does this "t" constraint or equivalent exist for AArch64 and does something need to be fixed there too?

Does this "t" constraint or equivalent exist for AArch64 and does something need to be fixed there too?

There’s no ’t’ for aarch64:
https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints