[PATCH] D126479: [Clang] Allow 'Complex float __attribute__((mode(HC)))'
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 31 10:58:20 PDT 2022
tahonermann added inline comments.
================
Comment at: clang/lib/Basic/TargetInfo.cpp:287-288
FloatModeKind ExplicitType) const {
+ if (getHalfWidth() == BitWidth)
+ return FloatModeKind::Half;
if (getFloatWidth() == BitWidth)
----------------
aaron.ballman wrote:
> I *think* this is correct, but it's a bit worrying because we have multiple floating-point types with the same width. e.g., `HalfTy` and `BFloat16Ty`, so I am a bit uncomfortable with the `getRealTypeByWidth()` interface in general once we go down this route. `getRealTypeForBitwidth()` will have similar issues.
I think this is probably ok. If support for the other 16-bit types is needed in the future, then new mode attribute arguments will have to be specified as is done for the 128-bit types with "K", "T", and "I".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126479/new/
https://reviews.llvm.org/D126479
More information about the cfe-commits
mailing list