[llvm] [DebugInfo][SimplifyIndVar] Fix missing debug locations for div/rem instructions (PR #97284)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 09:02:12 PDT 2024
================
@@ -0,0 +1,255 @@
+; Test that the debug information is propagated correctly to the new instructions
+; RUN: opt < %s -passes=indvars -S | FileCheck %s
+
+define void @test_srem_urem(ptr %a) !dbg !5 {
+; CHECK-LABEL: define void @test_srem_urem(
+; CHECK: [[REM_UREM:%.*]] = urem i32 [[I_01:%.*]], 2, !dbg [[DBG20:![0-9]+]]
+; CHECK: #dbg_value(i32 [[REM_UREM]], [[META11:![0-9]+]], !DIExpression(), [[DBG20]])
+;
+entry:
+ br label %for.body, !dbg !18
+
+for.body: ; preds = %for.body, %entry
+ %i.01 = phi i32 [ 0, %entry ], [ %inc, %for.body ], !dbg !19
+ tail call void @llvm.dbg.value(metadata i32 %i.01, metadata !9, metadata !DIExpression()), !dbg !19
----------------
OCHyams wrote:
It looks like you've generated the debug info in this test using debugify. Please can you use `--debugify-level=locations` so that variable location debug info is omitted.
Can the tests be reduced any further too (e.g., do we need all the control flow?)?
https://github.com/llvm/llvm-project/pull/97284
More information about the llvm-commits
mailing list