[PATCH] D133311: [Assignment Tracking][16/*] Account for assignment tracking in mldst-motion

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 27 06:20:33 PST 2022


jmorse added inline comments.


================
Comment at: llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll:22
+; CHECK: if.then:
+; CHECK-NEXT: call void @llvm.dbg.assign(metadata i32 1,{{.+}}, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 32), metadata ![[ID:[0-9]+]], metadata ptr %1, metadata !DIExpression())
+
----------------
nikic wrote:
> 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?
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133311/new/

https://reviews.llvm.org/D133311



More information about the llvm-commits mailing list