This is an archive of the discontinued LLVM Phabricator instance.

[clang][RISCV] Fix ABI lowering for _Float16 for FP ABIs
ClosedPublic

Authored by asb on Mar 1 2023, 8:45 AM.

Details

Summary

For trivial cases (_Float16 as a standalone argument), it was previously correctly lowered to half. But the logic for catching cases involving structs was gated off, as at the time that logic was written the ABI for half was unclear.

This patch fixes that and adds a release note.

Diff Detail

Event Timeline

asb created this revision.Mar 1 2023, 8:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 8:45 AM
asb requested review of this revision.Mar 1 2023, 8:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 8:45 AM

LGTM, just a nit :)

clang/test/CodeGen/RISCV/riscv64-abi.c
1909

This seems removed accidentally, I saw clang/test/CodeGen/RISCV/riscv32-abi.c still keep.

asb updated this revision to Diff 505575.Mar 15 2023, 11:21 AM

Rebase.

asb added inline comments.Mar 15 2023, 11:32 AM
clang/test/CodeGen/RISCV/riscv64-abi.c
1909

update_cc_test_checks.py is actually correct to remove this. void f_struct_float16_int8_insufficient_fprs happens to have different output for lp64f vs lp64d (it has floats and doubles in its arguments).

This revision was not accepted when it landed; it landed in state Needs Review.Mar 26 2023, 8:21 AM
This revision was automatically updated to reflect the committed changes.