jlebar added inline comments.
================ Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:419 +TARGET_BUILTIN(__nvvm_match_any_sync_i64, "WiUiWi", "", "ptx60") +// These return a pair {value, predicate} which requires custom lowering. +TARGET_BUILTIN(__nvvm_match_all_sync_i32p, "UiUiUii*", "", "ptx60") ---------------- Nit, non-restrictive "which" should get a comma. :) ================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9603 + Value *Pred = Builder.CreateSExt(Builder.CreateExtractValue(ResultPair, 1), + PredOutPtr.getElementType()); + Builder.CreateStore(Pred, PredOutPtr); ---------------- Doing sext i1 -> i32 is going to cause us to store 0 or -1 in the pred (right?). The CUDA docs say > Predicate pred is set to true if all threads in mask have the same value of > value; otherwise the predicate is set to false. I'd guess that "true" probably means 1 (i.e. uext i1 -> i32) rather than -1, although, I guess we have to check. https://reviews.llvm.org/D38191 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits