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

    <tr>
        <th>Summary</th>
        <td>
            [SLPVectorizer][AArch64][SVE] Opt crashed when optimizing
        </td>
    </tr>

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

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

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

<pre>
    Clang crashed when compiling `flang/lib/Evaluate/intrinsics-library.cpp` after #67275 in [clang-aarch64-sve-vls-2stage1](https://lab.llvm.org/buildbot/#/builders/176/builds/5474).
After reproducing and reducing, I get the IR causing crash: [aarch-sve-crash.ll](https://gist.github.com/XChy/4cb02b756de70d807440aaa88dbeeab3)

I'm not a expert in backend. So I try `opt -S -O3 -vectorize-slp -vectorize-loops`, and it performs well.
But when I try `opt -S -O3 -vectorize-loops -vectorize-slp -mtriple aarch64-unknown-linux-gnu --mcpu=neoverse-512tvb`, it crashed and reported "Not a vector MVT!"

It seems to be a backend/target bug.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU8GOpDYQ_RpzKYGMMdAcOPRMb0sjJdkoE41ytXE1OGtsyzY9O_v1kenpzU4SKRdQVclVr169J2LUs0UcSftA2lMhtrS4MP7xuLwV0qm38dEIO8MURFxQweuCFia3em20nYF09JLrhJ2NloSdP12F2URCws7apqBt1FMsjZZBhLdq8p50FMQlYQDCmq5nfQvaAmkfptynFCJMS8fLeMXyamLJYhIz1qQ9EXZYUvKRNEfCznmgkJUx17VyIc-XmzZKurQXm3sCQyTsXPfdPZHDlvecsKEi9ETo8bijCeiDU9uUtxJWQcBbQNgjPMGMCdKC8PQbTGKL-s4IaY4Z-456x7xnK2P-C_CsY6pmnZZNVpNbCTtnlgk780lSJvu2U9hTdaA951QIcTgoiShkQ9hwg3r7PhHWr2BdAgH41WNImUIppi9oVQXPDp4ghbd8HOcTlM9Qfm6gvOKUXNDfsIzG_xga53wkHc2r5tV1Ao_h4sIa4RWNeefpYUu38_9P973dv8atKWhvEO4H3uwX615tabTdvpaz3aAs18lvpDlZdFcMEcu2Zukq35Hp9F2Et_t4FxIqIIz9slNxGwg_v_xOWE0Y-0BZgoi4RkgOJIK4s0XYOYmQryu3uSrU2KihGUSBY90Nfd0zznmxjB2tlcJBqZoPCgdeIw4H2lAp-OXS4aXQI6OsqWndUM57xqtW0vrS1pwp1dDuwAinuAptviu20DFuOHaHoW0KIySauFuQMYuvsBfzDu2pCGN-U8ptjoRTo2OKf3dJOpndu88__fpyZzxk9bUPx-NO9S14fvlE2hN89umjl51PetXftJ2LLZjxn4r9Qax55vuv9MH9iVP22o40m2rf5K8AAAD__5RUYIA">