Arpith, I'm afraid that bool type is translated to i8 or even to i32 type rather than to i1. I believe you'd better to use CGF.ConvertTypeForMem(Context.getBoolType())to get the correct return type for bool rather than simply i1. You'd better to check how bool(...) function type is converted to LLVM IR.
Best regards, Alexey Bataev > 9 янв. 2017 г., в 15:09, Arpith Jacob via Phabricator > <revi...@reviews.llvm.org> написал(а): > > arpith-jacob marked 2 inline comments as done. > arpith-jacob added inline comments. > > > ================ > Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:365 > + llvm::FunctionType *FnTy = > + llvm::FunctionType::get(llvm::Type::getInt1Ty(CGM.getLLVMContext()), > + TypeParams, /*isVarArg*/ false); > ---------------- > ABataev wrote: >> Does it really return I1 type? Or I8? > Alexey, the runtime function is called by every worker thread. It returns a > 'bool' that indicates if the thread has been activated in the parallel > region, which is why I used an Int1Ty. Please let me know if you see > problems with this. Thanks. > > > https://reviews.llvm.org/D28145 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits