[PATCH] D114099: Enable `_Float16` type support on X86 without the avx512fp16 flag
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 17 16:03:41 PST 2021
rjmccall added inline comments.
================
Comment at: clang/lib/Basic/Targets/X86.cpp:242
HasAVX512FP16 = true;
- HasFloat16 = true;
} else if (Feature == "+avx512pf") {
----------------
We should probably be setting `HasLegalHalfType` here.
================
Comment at: clang/lib/Basic/Targets/X86.cpp:372
+ // Turn on _float16 for x86 (feature sse+)
+ HasFloat16 = SSELevel >= SSE2;
----------------
Out of curiosity, why SSE2? SSE2 adds double-precision, but we just need single-precision, which is in the original SSE.
It doesn't much matter anymore, of course, since both are ubiquitous.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114099/new/
https://reviews.llvm.org/D114099
More information about the cfe-commits
mailing list