mldst-motion will merge and sink the stores in if-diamond branches into the common successor. Attach a merged DIAssignID to the merged store.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll | ||
---|---|---|
22 | This looked a bit weird to me, so I want to double check that it is correct: %1 here is the new merged GEP inserted in the if.end block, while these dbg.assigns are in the if.then and if.else blocks. In other words, %1 does not dominate these dbg.assigns. Is that normal for debug intrinsics? |
llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll | ||
---|---|---|
22 | Thanks for checking in about this test!, That's correct, this is checking for a use-before-def. The IR verifier permits debug intrinsics to do that without error -- it can happen whenever an instruction sinks, which occurs in numerous places, and we just tolerate that for debug intrinsics. That kind of transform is explicitly what this test is checking for. |
llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll | ||
---|---|---|
22 | Makes sense, thanks for the explanation! |
This looked a bit weird to me, so I want to double check that it is correct: %1 here is the new merged GEP inserted in the if.end block, while these dbg.assigns are in the if.then and if.else blocks. In other words, %1 does not dominate these dbg.assigns. Is that normal for debug intrinsics?