<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/110149>110149</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Preserve Debug info after vector scalarization
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
farzonl
</td>
</tr>
</table>
<pre>
Currently we don't have a Debug Info story so adding the getter\setters for the metadata to trasfer to the new global doesn't give us anything we can test. When We start to develop the debug info we need to revisit this issue invoke the getters and add debug info to the newly created global.
There is a `NewGlobal->addDebugInfo(...)` I don't want to just tack this on without understanding it well.
it seems like I need to fetch the dbg metadata via `G.getMetadata("dbg")` convert the metadata to a `DIGlobalVariableExpression` and then pass that to `addDebugInfo`? Is that it?
What type of tests would make sense for this? Since this is IR I don't think I get `; line:5 col:12` without source?
_Originally posted by @farzonl in https://github.com/llvm/llvm-project/pull/110029#discussion_r1776178060_
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlM2S2zYMgJ-GumCioShbsg86bLJxxof-TNvpHncoEZKYpUkPAcl1nr5D2pvdpqdcbI1EgB8-gNREdvKIndh-FNvHQi88h9iNOn4L3hV9MNfu0xIjenZXuCCY4IVqGWa9Imh4xH6Z4OjHAMQhXoECaGOsn4BnBJiQGaPYfqL8QDCGmL-ckLXRrIEDcNQ0YsyPM4LHC0wu9NqBCUi3_Sa7IiwE2l95TukvCIP2wEhcwtOMHp4QiHXklMfgii6ccz6TGW1iTFEe0aQlEVdLloFnS2CJFgTr1_CCOWi682pvUkHvk7xhuisMETWjuQOXQj4K-fD_379mjAiWQINo5K94-ZLXfxD1Z21MtpgkCrUry1KovWgkwPG77Yv2uayvCzGwHl5u1MHDxfIcFobFG4zE2mf3luGCzpVw290yEOKJwNkXhON3BSPyMN8c9dNbS1abKb-UE_Iv95dC7YRSpp-EUne-IfgVk-4f2pmDH4-3Cv_W0ere4ed_zhGJbPApNFnl1LOzJgKeda5ONPI_Mhop6gMc7wssi_rw3ulTDrueEcKY54DgEhZn4KRfEAg94X3cLKVEf1o_4Gu74fjHO79ppF7gmLoOeduP4KxHUT9sYQhO1A-VStyvtiksccAfeJ5_i3ayXjt3hXOgNBX9FcRG3k8TWA8z85lE_SDUQajDZHle-nIIJ6EOzq2vfx_OMXzFgYU6nBfnhDpUlZRqL1RtLA1L9vgcq7ZtqnYnG_l8I4DCdLXZ13tdYFe1qq1btVOymLvKDLrdDWOlVLM149gorYdq3Cmst6qvVWE7JdVG7lVTtZtWytJsGtUOuGvbvR4bWYuNxJO2rkyAZYhTkc9MV1Wy2uwLp3t0lK8RpdIJzl_TsGwfi9jlqvplIrGRzhLTWxq27LD7PSJhXPF-o-SDpkfGCCsOHCLQoJ2O9ptmG3yxRNf9tMuMRDebiXnt1L8BAAD__3u7pkw">