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

    <tr>
        <th>Summary</th>
        <td>
            [x86_64] Backend Hangs due to Infinite Looping during Scheduling
        </td>
    </tr>

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

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

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

<pre>
    ## Description

The following code causes the x86_64 backend to hang during scheduling.

Maybe related to #63790. 

## Minimal Reproduction

https://godbolt.org/z/38rdr4fMY

### Code

```ll
define void @f(i64 %0, i8 %1, <8 x i64> %2, ptr %3) {
BB:
  %E = extractelement <8 x i64> %2, i8 %1
  %P = inttoptr i64 %E to ptr
  %R = call <32 x i8> %P(i64 %0)
  store <32 x i8> %R, ptr %3
  ret void
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U1tv2zwM_TX0i9DAphzFfvBD09ToB3wFim4vexpkibG1KVIgyb39-kFOut4wwLAJ8vDwYh4ZoxkdUQfrLax3hZzT5EN3I1-eexOnYvD6uQPkgJztKKpgjsl4B-UOysvT-_tEbO-t9Y_GjUx5TUzJOVJkaSL21IifomaDVL_JaZY8m6QbmZ5DRkc1kZ6tcePqPeWtfB6IBbIy0ZIDyAXftOWKvYed-7o1zhykZfd0DF7P6nODU0rHCPwSsAfsR68Hb9PKhxGwfwHseRN0qPe3P75yZ_orr-lDRJSnx9qTQ9PeOGIP3mgGdbkHbIyoGeC6BLxipslmlU3gVw17YkbUwK-zF7P3mEK2OWDLYLM9kW63uePFZDl6zYDvGD2lIFUiSwdy6R98rwXfku-WZONS8rnYubvrvNljCu-A9wtQSWszN8dM3py57z7M1b5mxeQDfUXff5jsjA2UljWdF7nZfdpooTuuW97KgrpKtCWvNqIRxdSVqqlLItEMUmFZV7LR-6ZRdTtUKNTAC9Nhibzc4DqHUazW1XpAlFIJIeqm1VCXdJDGrqx9OOSfX5gYZ-pEXVVVYeVANi4iQHT0yJYgIGZNhC7nXAzzGKEurYkpvrEkk-yintOhw3rHtudbv5FujEzPlPf8n9sbZxKx_70_mjcFfPurgGIOtvt0qyZN87BS_gDY55Lnz8Ux-F-kEmC_NBoB-2WQPwEAAP__c8oU0Q">