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

    <tr>
        <th>Summary</th>
        <td>
            [SCEV] Infinite recursion in ScalarEvolution::getConstantMaxBackedgeTakenCount()
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            SCEV
      </td>
    </tr>

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

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

<pre>
    ./bin/llc -O3 -o out.s ./tc_segf.ll

reduced test case:
[testcase.tar.gz](https://github.com/llvm/llvm-project/files/8237956/testcase.tar.gz)

Called from loop data prefetch.



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVkF1r3TAMhn9NcmOOSex8XuSiPW2hg7FBx26HYiuJWx_7YMtl26-fk26s7G5gJKxXSM-r2esfEy_Ew2xcjtYqdvok2ckzn4hHtkukvkVcF25tUd0V1c1bDKiTQs0IIzEFEQv5Wyna27241zhB4OvPor0rxLARXePeJR7yWw1taebKX469r3_S6Rr8MyrK38VYjDkPQvZj2-0o_8wV43ukM1ibiZbgL8x6f2UaCNg14IKkNv6-9S2WepJ6lCOUZMjilMmfzvdfMy57dItxhpAFVClE4x0zjj0psBDuX71NlEu7GXmzIp29iwSOPsL3W1AvqFf8Ai_ozj657GTIoGUKdvrvE5gY03GDtpFtX25T18-zqKpeYtNrpdXQAcgW6r6TLSpVlxZmtHG3UghxuBEiGyrNJCohKlmLupNjNXDdikq3fQP9XIu-6YqmwgsYy3cE7sNahumgmdMas2hNpPhXhBjN6vA42j4fEm0-TB-8-xyjd-VBPh3YvwCxJMAK">