jchlanda added inline comments.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:18912 + case NVPTX::BI__nvvm_ldu_h2: { + return MakeHalfType(BuiltinID, E, *this); + } ---------------- tra wrote: > We seem to be checking builtin IDs twice. Once here and then in MakeHalfType > where we need to map them to intrinsics. > I think the approach used for atomics above would work better here, too -- > just pass appropriate Intrinsic as a parameter to MakeHalfType and remove the > switch there. > > Another option you may consider is that if the availability is only dependent > on PTX or SM version, then we may get by with declaring the builtins as > TARGET_BUILTIN with appropriate constraints and let the standard enforcement > machinery to handle diags. I've refactored those switches and passed intrinsic ID to `MakeHalfType` helper. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146715/new/ https://reviews.llvm.org/D146715 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits