<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/131512>131512</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            debugline llvmir is different from dwarfdump
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Guo-yyds
      </td>
    </tr>
</table>

<pre>
    I am doing a strange project, I don't have the ast to join the line number information inside, then I am xxir (my own definition of intermediate code format) turn llvmir use 
```c
LLVMInstructionSetDebugLoc (r, loc); 
```
Added line number information, but now there is a problem, llvmir and dwarfdump line number information is different, dwarfdump line number information has a part of 0 line


```
attributes #0 = { "frame-pointer"="all" "frame-reserved-slots"="16" }
attributes #1 = { nocallback nofree nosync nounwind readnone willreturn }
attributes #2 = { nounwind readonly }
attributes #3 = { cold }

!llvm.dbg.cu = !{!0}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "ArkCompiler", isOptimized: false, flags: "-O0 -g", runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, sysroot: "/")
!1 = !DIFile(filename: "hello-world.ts", directory: "/home/guo/ark")
!2 = distinct !DISubprogram(name: "func_main_0@hello-world.ts@414@hello-world.abc", linkageName: "func_main_0@hello-world.ts@414@hello-world.abc", scope: !1, file: !1, line: 1, type: !3, scopeLine: 2, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4)
!3 = !DISubroutineType(types: !4)
!4 = !{}
!5 = !{!"rsp\00"}
!6 = !DILocation(line: 7, scope: !2)
!7 = !DILocation(line: 7, column: 10, scope: !2)
!8 = distinct !DISubprogram(name: "#*#fib@hello-world.ts@386@hello-world.abc", linkageName: "#*#fib@hello-world.ts@386@hello-world.abc", scope: !1, file: !1, line: 3, type: !3, scopeLine: 4, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, retainedNodes: !4)
!9 = !DILocation(line: 4, column: 2, scope: !8)
!10 = !DILocation(line: 4, column: 8, scope: !8)
```

```
Address Line   Column File   ISA Discriminator OpIndex Flags
------------------ ------ ------ ------ --- ------------- ------- -------------
0x00007f1585a69000      1      0      1   0             0 0  is_stmt
0x00007f1585a69105      7      0      1   0             0 0  is_stmt prologue_end
0x00007f1585a69115      0      0      1   0 0       0 
0x00007f1585a69144      7     10      1   0             0 0 
0x00007f1585a69154      0     10      1   0             0       0 
0x00007f1585a69580      1      0      1   0             0       0 is_stmt
0x00007f1585a69644      4      2      1   0             0       0 is_stmt prologue_end
0x00007f1585a69654      0      2      1   0 0       0 
0x00007f1585a69914      0      2      1   0             0       0 end_sequence
```

![Image](https://github.com/user-attachments/assets/cc5061e9-20b8-4287-8651-e277be5d7b3a)

What could be the reason for this?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8V1tv47oR_jX0y8ABRV394Acnhg-MprsFcnrOY0CJI5lnKdLlZbPury8oybfEyW7QooZgitTMNzPfzEgkd052GnFJ8nuSr2c8-J2xy9-CmR8Ows1qIw7LLfAehJG6Aw7OW647hL01f2HjCXuALQijCSs97Ph3BL9D4M6DN_CXkXqYK6kRdOhrtCB1a2zPvTQapHZSYATxO9QwWPrxQ1ogrOoPYF40CGylloO0aUFqj7ZHIblHaIxAGMEIW4APVoNS33tpITgEQlekoOPVELp6fPzj71vtvA1NhHtCv8Y6dI-mieZs9EKZhrAFSe-vlAldrYRA8V4YUbMOHrR5iXFYBOmAR4pqhf2AO3rFtQDxwm0rQr9_nxQHQrYtWtQDvz_X2PHBHrc-ckQHuRjAeF2Ewb23sg4eHRCWUiDpGkh5D4Sx1vIe53szMEwYI-maMMaVIoydn1t0aL-jmDtlvDuJJcUgVa7f2EhONrRpuFI1b76BNq1FBG3cQTegTdAvUguwyIU2GuFFKmVxyOctTHaBeaFqtDrclE9P8o1RYhKJF0tiYu5E3d01YRRiCSnvCUvopdRI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