[PATCH] D145071: [clang][RISCV] Set HasLegalHalfType to true if zfh is enabled
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 09:28:31 PST 2023
asb added a comment.
In D145071#4161744 <https://reviews.llvm.org/D145071#4161744>, @eopXD wrote:
> We probably should do the same to `HasRISCVVTypes` and `HasFloat16`.
I haven't looked at HasRISCVVTypes, but I did work through all the f16 related hooks I could find, and I think we're doing the right thing for HasFloat16. Setting it to false will reject `_Float16` with a Sema diagnostic, which I don't think is what we want and is also not consistent with other platforms that support f16 (we do lower to the appropriate libcalls on the backend, so can handle it just fine). HasFloat16 is unconditionally true for Arm and only gated on SSE2 support for X86
This seems to be in contrast to HasLegalHalfType, which appears to be about whether native instructions to handle it are present (such as avx512fp16 on X86).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145071/new/
https://reviews.llvm.org/D145071
More information about the llvm-commits
mailing list