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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to