I recently modified this pass to better support CHERI-RISC-V and while
doing so I noticed that this pass was calling M->getOrInsertFunction()
with the result of TLI->getLibcallName(RTLibType). However, AMDGPU fills
the libcalls array with nullptr, so this creates an anonymous function
instead. This patch changes expandAtomicOpToLibcall to return false in
case the libcall does not exist and changes the assert() in the callees to
a report_fatal_error instead.
Details
Details
- Reviewers
arsenm - Commits
- rG5bc438efcf96: [AtomicExpand] Avoid creating an unnamed libcall
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo