[PATCH] D113107: Support of expression granularity for _Float16.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 21:49:03 PST 2022


rjmccall added a comment.

So, this is still approach #4, i.e. changing the types of expressions, which is not what GCC appears to be doing: https://godbolt.org/z/67hqeb37h.  You need a custom emitter in IRGen for `_Float16`-typed arithmetic expressions.



================
Comment at: clang/lib/Sema/SemaExpr.cpp:1158
+        !S.getASTContext().getTargetInfo().hasLegalHalfType()) {
+      // Wen the RHS is complex_float16 and the LHSType is a Float
+      // then promote the precision of the LHS (less precise type is converted).
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113107/new/

https://reviews.llvm.org/D113107



More information about the cfe-commits mailing list