[llvm] [DebugInfo][LoopIdiomRecognize] Fix #82582: Wrong debug location update in processLoopStoreOfLoopLoad (PR #82608)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 02:15:50 PST 2024


================
@@ -10,12 +10,11 @@ target triple = "x86_64-unknown-linux-gnu"
 
 ; Check that everything still works when debuginfo is present, and that it is reasonably propagated.
 
-; CHECK: remark: <stdin>:6:1: Formed a call to llvm.memcpy.p0.p0.i64() intrinsic from load and store instruction in test6_dest_align function{{$}}
+; CHECK: remark: <unknown>:0:0: Formed a call to llvm.memcpy.p0.p0.i64() intrinsic from load and store instruction in test6_dest_align function{{$}}
----------------
SLTozer wrote:

Dropping the location for `NewCall` is the right thing - but it seems to me that the optimization remark would be more useful if we retained the old debug loc, which is still correct for attribution purposes (though unfortunately we can't separate stepping and attribution concerns at the moment); you could change the optimization remark to refer to `TheStore`'s DebugLoc, and we could get a meaningful source location here.

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


More information about the llvm-commits mailing list