[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:49 PST 2024


================
@@ -0,0 +1,103 @@
+; RUN: opt < %s -passes=loop-idiom -S | FileCheck %s
+
+; Function Attrs: noinline nounwind uwtable
+define dso_local void @fun(ptr noalias noundef %a, ptr noalias noundef %b) #0 !dbg !10 {
+
+; CHECK-LABEL: entry:
+; CHECK-NOT: call void @llvm.memcpy.p0.p0.i64{{.*}}dbg {{![0-9]+}}
----------------
SLTozer wrote:

Might be a good idea to add a positive check that the `memcpy` instruction does appear - if something changes in the future and we produce a different instruction for this optimization, or this optimization stops happening in this case, this test will continue to pass even if the error reappears.

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


More information about the llvm-commits mailing list