I’ve recently seen that assignment tracking (Debug Info Assignment Tracking — LLVM 18.0.0git documentation) is now enabled by default (-fexperimental-assignment-tracking).
An llvm.dbg.assign instruction is linked to a store instruction using a DIAssignID metadata, and both instructions are required to reside in the same function (enforced by the Verifier). When using the CodeExtractor, this requirement might be validated.
In our case we had a loop with a store instruction and its matching llvm.dbg.assign instruction. After LICM only the store was hoisted, keeping the dbg.assign in the the same location. We then extracted the loop to a different function using CodeExtractor, which also extracted the dbg.assign instruction, without the store, thus breaking the above requirement.
Is it a common issue?
Thanks,
Ziv