<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58903>58903</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MemCpyOpt] Lifetime marker moved above operand def
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
nikic
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
clin111
</td>
</tr>
</table>
<pre>
After 9a45e4b, memcpyopt moves lifetime intrinsics above the def of the value operand, when the def lies between the 2 calls being merged. Test case attached.
[reduced.txt](https://github.com/llvm/llvm-project/files/9975072/reduced.txt)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVkMuO3CAQRb8Gb1AsHsY2CxadGc1qomzyAxiXbWbwQ1DuTv99sNOdZBsJQT3QrVO3W_u7uQwIkWpbKag6Il7oDLPb7uuGdF6vkGjwA6CfgfoFo1-Sd4naLrcoTkB7GOg6nOHVhh3oukG0S38o3SZY_nwKPmt1gDd4FAV1NoSj5pcxT40j9CX9AQlzIwG1iNZNuUbYK2EXor5G6HeXC_gTiXolop0Qt0TkhYi3fEaP096Vbp1zEsL1-XzZ4voBDnM6-AApv1o3ijUiR_9qCv17VAGG13XLRNMoXvRG9lpqW6DHACZzfIP5Zbt_3w4K-v60Z7bxMzt5mNY_DHp4cexf7DGY_-b1Ke0nsGo1k8VkVMWkrIXLN5ONA2bV0A51A32ntWZ1EWwHIR2URIgFbvSUyHFmLbwRTAjOmRacCclLLkBUvFa8Aq5l15KKwWx9KA-Oco1jEc2J1O1jys3gE6a_TZuSHxeA5zj_6d1jlN1xWqNxwS-c8-KkMOcWvwAg9ssD">