Issue 91436
Summary [DebugInfo][IndVarSimplify] Missing debug location updates of newly created instructions
Labels new issue
Assignees
Reporter Apochens
    I've found missing debug location updates in IndVarSimplify Pass (IndVarSimplify[-L358](https://github.com/llvm/llvm-project/blob/6f2997cefc1e32c11a891ede2e3a2d73310e6ce1/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L358), [-L363](https://github.com/llvm/llvm-project/blob/6f2997cefc1e32c11a891ede2e3a2d73310e6ce1/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L363), [-L368](https://github.com/llvm/llvm-project/blob/6f2997cefc1e32c11a891ede2e3a2d73310e6ce1/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L368C3-L370C64), [-L394](https://github.com/llvm/llvm-project/blob/6f2997cefc1e32c11a891ede2e3a2d73310e6ce1/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L394)), and used -debugify on the regression test `floating-point-iv.ll` to double check the missing debug locations:

```
WARNING: Instruction with empty DebugLoc in function test1 --  %indvar.conv = sitofp i32 %iv.int to double
WARNING: Instruction with empty DebugLoc in function test1 -- %.int = add nuw nsw i32 %iv.int, 1
WARNING: Instruction with empty DebugLoc in function test1 --  %1 = icmp ult i32 %.int, 10000

WARNING: Instruction with empty DebugLoc in function test2 --  %indvar.conv = sitofp i32 %iv.int to double
WARNING: Instruction with empty DebugLoc in function test2 --  %.int = add nsw i32 %iv.int, 2
WARNING: Instruction with empty DebugLoc in function test2 --  %1 = icmp slt i32 %.int, -1

WARNING: Instruction with empty DebugLoc in function test5 --  %.int1 = add nsw i32 %.int, -1
WARNING: Instruction with empty DebugLoc in function test5 -- %3 = icmp slt i32 %.int1, 0

WARNING: Instruction with empty DebugLoc in function test_max_be --  %indvar.conv = sitofp i32 %tmp11.int to double
WARNING: Instruction with empty DebugLoc in function test_max_be -- %tmp13.int = add nuw nsw i32 %tmp11.int, 1
WARNING: Instruction with empty DebugLoc in function test_max_be --  %tmp14 = icmp ult i32 %tmp13.int, 99999

WARNING: Instruction with empty DebugLoc in function test_max_be2 --  %indvar.conv = sitofp i32 %tmp11.int to float
WARNING: Instruction with empty DebugLoc in function test_max_be2 --  %tmp13.int = add nuw nsw i32 %tmp11.int, 1
WARNING: Instruction with empty DebugLoc in function test_max_be2 --  %tmp14 = icmp ult i32 %tmp13.int, 99999

WARNING: Instruction with empty DebugLoc in function test_max_be3 --  %indvar.conv = sitofp i32 %tmp11.int to float
WARNING: Instruction with empty DebugLoc in function test_max_be3 --  %tmp13.int = add nuw nsw i32 %tmp11.int, 1
WARNING: Instruction with empty DebugLoc in function test_max_be3 --  %tmp14 = icmp ult i32 %tmp13.int, 99999

WARNING: Instruction with empty DebugLoc in function pr55505_remove_redundant_fptosi_for_float_iv --  %indvar.conv = sitofp i32 %float.iv.int to float
WARNING: Instruction with empty DebugLoc in function pr55505_remove_redundant_fptosi_for_float_iv --  %float.iv.next.int = add nsw i32 %float.iv.int, -1
WARNING: Instruction with empty DebugLoc in function pr55505_remove_redundant_fptosi_for_float_iv --  %cmp = icmp ugt i32 %float.iv.next.int, 0
```

The missing debug location of the PHINode is not reported in the debugify's output.

I will patch these missing updates later.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to