This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Support fp16/bf16 using w constraint
ClosedPublic

Authored by lenary on Oct 11 2022, 6:02 AM.

Details

Summary

fp16 and bf16 values can be used in GCC's inline assembly using the "w"
constraint, which means "VFP floating-point registers d0-d31" - fp16 and
bf16 values are stored in S registers (which alias the D registers).

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

Diff Detail

Event Timeline

lenary created this revision.Oct 11 2022, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 6:02 AM
lenary requested review of this revision.Oct 11 2022, 6:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 6:02 AM

This is a follow-up to https://reviews.llvm.org/D134553 where we noticed that the "w" constraint support was similarly missing, like the "t" constraint, for fp16. https://gcc.godbolt.org/z/vfzzf8ajz shows GCC working in this case.

DavidSpickett accepted this revision.Oct 11 2022, 6:24 AM

LGTM, thanks.

This revision is now accepted and ready to land.Oct 11 2022, 6:24 AM
This revision was landed with ongoing or failed builds.Oct 13 2022, 2:32 AM
This revision was automatically updated to reflect the committed changes.