rjmccall added a comment.

Can we split the patch which changes what types are enabled for various x86 
sub-targets out from the patch that changes the semantics of operations on 
`_Float16`?  Or is there a good reason it's disabled currently, namely because 
the semantics are wrong?



================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1315
+  if ((SrcType->isHalfType() || iSFloat16Allowed) &&
+      !CGF.getContext().getLangOpts().NativeHalfType) {
     // Cast to FP using the intrinsic if the half type itself isn't supported.
----------------
Okay, this condition is pretty ridiculous to be repeating in three different 
places across the compiler.  Especially since you're going to change it when 
you implement the new option, right?

Can we state this condition more generally?  I'm not sure why this is so 
narrowly restricted, and the variable name isn't telling me anything, since 
`_Float16` must by definition be "allowed" if we have an expression of 
`_Float16` type.


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

https://reviews.llvm.org/D113107

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

Reply via email to