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

    <tr>
        <th>Summary</th>
        <td>
            COMPILETIME ERROR, llvm-17, vector <8 x i3>, insertelement instruction after load, code emition
        </td>
    </tr>

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

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

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

<pre>
    Compiletime error for vector <8 x i3>

[vec8i3.zip](https://github.com/llvm/llvm-project/files/14403412/vec8i3.zip)
```
$ clang -O1 -S vec8i3.ll
```

In function ScheduleDAGMILive::updatePressureDiffs for test-function @ins2:
```
4 libLLVM-17.so.1    0x00007f4e50cf92f7 llvm::ScheduleDAGMILive::updatePressureDiffs(llvm::ArrayRef<llvm::RegisterMaskPair>) + 1351
5  libLLVM-17.so.1    0x00007f4e50cf9f1a llvm::ScheduleDAGMILive::scheduleMI(llvm::SUnit*, bool) + 1146
6 libLLVM-17.so.1    0x00007f4e50cf98b1 llvm::ScheduleDAGMILive::schedule() + 337
```

Problem test function:
```
define void @ins2( <8 x i3>* %a, i3 %b, i32 %c) {
  %x = load <8 x i3>, <8 x i3>* %a
  %y = insertelement <8 x i3> %y, i3 %b, i32 %c
  store <8 x i3> %y, <8 x i3>* %a
  ret void
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVF2P6jYQ_TXOiwVyxg5xHvLA8lEhgRaxbd-dZAJuTYxsh-7211cxXChX3FsqRc7E9pk5PuMc5b3ed4glyd5INk9UHw7WlV434YxOJZVtvsqZPZ60waCPSNE562hrHT1jHayjhM8k_aSaE74gbE7Y9Dpmb2espebjv_WJZHMC8hDCyRM-JbAksNzrcOircW2PBJbGnL-9Ridn_8A6EFi22qAnsEyFYFykQGD5r5xQXCtN2PW5fIKgtVHdno7eUzr6oFeIMc-3x3HV0bbv6qBtRz_qAza9wfn0l81qrc84UObT_tSogFuH3vcO57ptfdQhoA-jG5gIpjsPA-RZNUGNrtbr3zejNB97O04ppZR9MsZY3grMWN0W0OY06hHLvs6GgLzDps6prx22hM_ukzvcax_QbZT_c6u0G1oGBSXwRlOepReKGX2BY5uq_-bor9Ob1QO1j986HQhMCcxoZa25UUjF5EJh8gIDWaWvMyAgv1XhPP_JPdg6Wxk8xqbebsSPmtlgqzukZ6ubW99BPv4RMKUEMjWcVfMhrC4hDHEdSeVvl3R0mPqkhM-psar5Ls_sed478isidefRBTR4xC48QOKeH_G4pvHBOnyO-ll1hyGqcFUpn38nV9KUvCl4oRIs05zJQoiMT5JDKZlSgk9A1jJnwDOsIJNZgVkKosZGJroEBoIBTFImZDYZA6t5m8m8akTRiFwRwfCotBkPd2Fs3T7R3vdYSigkJEZVaHw0N4AO_6JxkQAMXufKaDdVv_dEMKN98PcsQQeD5ex9s12tF7-uNgu62O3ed4MSEZXmQ_jMAwdZH5qgOx9cf7EH1QZ0sb3Dvto2SPGoh6Wkd6b83w4ZzzNYZDzvPwEAAP__CUio1Q">