[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -3630,10 +3631,17 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI, std::vector Ops; Ops.push_back(Chain); + bool AddTargetGlobalAddr = true; + // Try to find the callee in the current module. + if (isa(Callee)) { +Callee = DAG.getSymbolFunctionGloba

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -596,6 +596,7 @@ static bool mustPreserveGV(const GlobalValue &GV) { if (const Function *F = dyn_cast(&GV)) return F->isDeclaration() || F->getName().startswith("__asan_") || F->getName().startswith("__sanitizer_") || + F->getName() == "__divti3" |

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +