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

    <tr>
        <th>Summary</th>
        <td>
            [DebugInfo][LICM] Missing debug location updates
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Apochens
      </td>
    </tr>
</table>

<pre>
    LICM[-L932](https://github.com/llvm/llvm-project/blob/6aac30fa43f094ac25269bda163dc89a88cb8da7/llvm/lib/Transforms/Scalar/LICM.cpp#L932), [-L937](https://github.com/llvm/llvm-project/blob/6aac30fa43f094ac25269bda163dc89a88cb8da7/llvm/lib/Transforms/Scalar/LICM.cpp#L937): Newly created FDiv `ReciprocalDivisor` is inserted before the instruction `I` replaced by new FMul `Product`.
```cpp
->  auto ReciprocalDivisor = BinaryOperator::CreateFDiv(One, Divisor);
| ReciprocalDivisor->setFastMathFlags(I.getFastMathFlags());
| SafetyInfo->insertInstructionTo(ReciprocalDivisor, I.getParent());
|_ ReciprocalDivisor->insertBefore(&I);

->  auto Product =
| BinaryOperator::CreateFMul(I.getOperand(0), ReciprocalDivisor);
| Product->setFastMathFlags(I.getFastMathFlags());
| SafetyInfo->insertInstructionTo(Product, I.getParent());
| Product->insertAfter(&I);
|   I.replaceAllUsesWith(Product);
|_ eraseInstruction(I, *SafetyInfo, MSSAU);
```

I will give the patch later.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMlN-L4zYQx_8a-UWskaX414MfnLiGwKV3dO_oYxnLY1tFaxlJ3iX_fZGTsNnbUNqXUggEJM3MZ74z_oJzapwRK5LuSdpEsPrJ2KpejJxwdlFn-nP15Xg4kXT_9KUUnKQN4cXk_eKIqAlvCW9H5ae1i6V5IbzV-vX297RY8ydKT3jbadMR3mYAUrABdmJg5Q4kT3lWdj0kmehlUUJRyK7oIb_Lo0LcdwuzG4x9cYS3zxI0WMLbwBXLZSFcbGi8JPxAr6T5_5c0D6Sipr_imz5TaRE89rRt1CslGfsNpVqskaAb9aqcsSRjVDmqZoc2POxwMBapnzCcebtKr8wcQo_hqcVFgwzvznTGN9qeVh0uv1nTr9KTjMWENYTVJGOXXwDbTp6I-IVSWL2hnygoEQ3dqxns-euCFryxQVZRHzb-QE948XXGMIMbeehzf62WHz4nDQUd-hacP4GfWg2jI7w4xuPnw228H_M9w4D-fJwHExJdBDq-S_LdEF58lpMf6FbgG1ic_cPMfzxGvVTYb_pvcdnxQ-DPIl4lD9K9Q_-NhqdV37rf7uee8IJd9_pBIx_VuFb7DzS9rdI_UPKe6pKsHjzaR-rlB0rpMb7ub631D4fud-Wn-4o_jQktOLzDC41uJsDr90bCwen5uf7xIfy2_fezO9I3pTUd1evl-1rAy4lq8GjjqK9EX4oSIqySPEmFYFmSRVPFxQ5S0SXAUQopBHYdyIL3HIeeJ0kWqYozvmNpwlixEyKLkXVluWP5kGcpMJRkx_AFlI6DlcTGjpFybsWqTPIkizR0qN3m0JyHL3q7JDx4cWSrzb-6dXRkx7Ry3r1n8crrzdob7NZxkyJtSLq_GHpDT8o5NY-0D9dUGwmbk6xLDx5dtFpd_Wv_3OCC-W3wfwUAAP__gh74Og">