[PATCH] D112398: [RISCV] Add ABI testing for Float16.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 26 13:22:25 PDT 2021
craig.topper added a comment.
In D112398#3087183 <https://reviews.llvm.org/D112398#3087183>, @frasercrmck wrote:
> It looks as though all checks are checking the same thing? Presumably this is expected? I wonder if allowing an extra combined check (`--check-prefixes=CHECK,CHECK-ZFH-ILP32F` or something) would make it more obvious when things *are* different between the different configs.
>
> I'm not familiar with how `Float16` is supposed to behave if the target doesn't advertise support `zfh`, but I come more from OpenCL where it's either fully supported or "storage-only", in which case I wouldn't expect a `fadd` to get past the frontend (or maybe it'd enforce promotion to `float`?). This isn't necessarily a blocker - I'm just showing the limits of my knowledge in this area.
If I remember correctly, the frontend doesn't know if the backend has support for half. It only has a single flag to say whether Float16 should be a valid type. I believe on AArch64 gcc does promote it in the frontend when there are no native instructions. clang does not. The effect of this is that clang rounds a lot more often than gcc when half isn't supported. gcc will promote an entire expression an only round at places like assignment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112398/new/
https://reviews.llvm.org/D112398
More information about the cfe-commits
mailing list