eandrews added inline comments.

================
Comment at: clang/lib/Sema/Sema.cpp:1978-1979
          !Context.getTargetInfo().hasInt128Type()) ||
+        (Ty->isBFloat16Type() && !Context.getTargetInfo().hasBFloat16Type() &&
+         !LangOpts.CUDAIsDevice) ||
         LongDoubleMismatched) {
----------------
tra wrote:
> @eandrews Do you recall what was the reason for *not* issuing the diagnostic 
> on the GPU side?
> 
> It appears to do the opposite to what the patch description says. We're 
> supposed to  `emit error for unsupported type __bf16 in device code`, but 
> instead we specifically ignore it during GPU-side compilation. What am I 
> missing?
> 
> 
> 
I don't recall the specifics but I think CUDA had code handling __bf16 
differently and this change broke a test with CUDA diagnostics and so I 
excluded it from the patch. I could try removing this check and seeing what 
breaks if you'd like. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141375

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

Reply via email to