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

    <tr>
        <th>Summary</th>
        <td>
            [X86] 454.calculix miscompare after #143017
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:X86
      </td>
    </tr>

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

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

<pre>
    This may not be reprodusible with the upstream Flang, because I have a customized LLVM pipeline that runs some extra passes.  At the same time, I can confirm that #143017 causes the miscompare by reverting it.

The only change in the whole benchmark appears in `stiff2mat.f` module that contains a single function.

Attaching the assembly for `stiff2mat.f`:
* With #143017: [bad.s.gz](https://github.com/user-attachments/files/20680266/bad.s.gz)
* Without #143017: [good.s.gz](https://github.com/user-attachments/files/20680273/good.s.gz)

Here is the LLVM IR and MIR dumps right before and afrer `x86-isel`:
* With #143017: [isel.bad.log.gz](https://github.com/user-attachments/files/20680318/isel.bad.log.gz)
* Without #143017: [isel.good.log.gz](https://github.com/user-attachments/files/20680321/isel.good.log.gz)

Please let me know if you need information from more passes.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVM1u5DYTfBrq0rAgURI9Ougw-xmDz8guEDiLJNcW1ZIY80fgz9jjpw8ojx0jC2QvPvFAVlVXdbMxBLVYooF1XxjnD7_8poyzjHPW3RWY4ur8cH7BxxW9KkY3XYbvqwpg8ALWRRgJPG3eTSmoURM8qbhCXAnSFqInNHDSaBfG_wcjSUyB4B5WPBMgyBSiM-qFJvj69fdvsKmNtLIEccUIPtkAwRkCeo4eYcMQKJQAx7gLBDQEURnK3Pcg0YJ0dlbevOIZb-q2qepb2GXDDjIqSGc29ATjBTydyUdlF1CxZNWRVcfvK4Gz-gJyRbsQKLvjnlanCUaycjXoHwG3jdCHfM1EFaKaZ24wljMTFRg3JX11IZ2NqGwAhKDsognmZGVUzl4FjzGiXHMNWSd7NKO-wOz8j8ysyQjGj_BHjvndIWuOwLovI05lKJcX1t0xflhj3EJG8BPjp0XFNY2ldIbxUwrkb3AXNmRjYPw0K0355JU4VFwIxk_vdLz_oOpS_EF4ce6zlG-bDHnne5Wujv8nT6Bee7jPyv0DoJ3g2_0DTMlsAbxa1jyOs_O0X-Hsac_w-SBuVCD98wDzqzLb1m75DDdNfWD89G_Wn8a5A_YMPqsOXr_V8ZH2LdxfNWEg0BTBEDxa9wRqhotLYIkmUHZ23mCeWZi9M2ByxNfvWExDM_VNjwUN9W3bd33d3IpiHQQ2ODdN1zfVLHoh5oqmwyymmpD42MlCDbziXSXqiteNqEU59oeuHmUle2wPbdOytiKDSpdan03p_FKoEBINdduIShQaR9LhurZGlI9kJ9Yc_zyI6_LyQwbejGkJrK20CjH8QxVV1PvOy--7O2i7tpSoZdLq-eOWwDnmKXrrUJG8Hv6jE5n_etxs3v1FMu7Jh7R341r6eeB_BwAA__9Tib03">