yaxunl added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenAction.cpp:299-308 + if (!LinkModules.empty() && Gen->CGM().getTriple().isAMDGCN() && + !Gen->CGM().getLangOpts().GPURelocatableDeviceCode) { + const StringRef GVS[] = {"__oclc_daz_opt", "__oclc_unsafe_math_opt", + "__oclc_finite_only_opt", + "__oclc_correctly_rounded_sqrt32"}; + for (StringRef Name : GVS) { + if (llvm::GlobalVariable *GV = getModule()->getGlobalVariable(Name)) ---------------- need a test. Probably let clang generate a bitcode containing a function using these control vars, then link the bitcode by -mlink-builtin-bitcode, then check the linkage of these control vars. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130096/new/ https://reviews.llvm.org/D130096 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits