[llvm] IPRA:Fix crash and verification failures for PLT calls (PR #196917)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 14 23:30:40 PDT 2026


================
@@ -154,7 +154,8 @@ bool RegUsageInfoPropagation::run(MachineFunction &MF) {
       };
 
       if (const Function *F = findCalledFunction(M, MI)) {
-        if (F->isDefinitionExact()) {
+        // The Function must not be preemptable.
+        if (F->isDefinitionExact() && F->isDSOLocal()) {
----------------
lenary wrote:

I'm not interested in how the two callbacks are different right now. I'm interested in why an optimisation that cares if the definition it found is the one it will have at runtime has to check two different callbacks. Surely if the definition is preemptible, then it is not exact.

I think this is potentially not something you can answer, as you didn't design either API you are using. It's maybe better for @MaskRay or someone else who understands how preemptibility is handled in IR?

https://github.com/llvm/llvm-project/pull/196917


More information about the llvm-commits mailing list