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

    <tr>
        <th>Summary</th>
        <td>
            Clang crash with -mcpu=grace -O3 -msve-vector-bits=128: error in backend: Cannot scalarize scalable vector loads
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    The following reduced testcase:
int a, d;
extern short b[];
long c;
void e(bool f[]) {
#pragma clang loop vectorize_predicate(enable)
  for (signed char g = 1; g < (char)d; g += 3) {
    a = f[g] ? c : 0;
    b[g] = 0;
  }
}
crashes for me with -mcpu=grace -O3 -msve-vector-bits=128:
error in backend: Cannot scalarize scalable vector loads

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycUs2SmzwQfJrhMmWXGBkbDhzWpnz9Lt89pZ8xKCuQSxLeJE-fAhNv7TE5MWi6pe6eUSm5fmJuoTpD1RVqzkOI7Xt-V2YIj0IH-7P9f2C8Be_Dh5t6jGxnwxYzp2xUYpBvIDoQb27KqIAuaEGen0f8I3OcMA0hZtTPN15NH6Yezev3EZxFBqp1CB5vG5gahNOGAJL3qPpRofFq6tGHcMcHmxyi-8Xf7pGtMyovd_CktGeg5slEvIWIQPXq1qIZVMQeQXZYgjyv5WXpLw2gxm6HdF4g8osKRES1UheNPVQdgryiQZBvKF52Fpj-BHRfWnDqNkt_ChNVGjitOkfGD5cH3I3mPoPs-qgM4-4_ibsxPXj3tLzTLieQXUn1awQcY4joJtTKvPNkF0kXNU0hYzLKqyWnZ6U9b9GhD8qmJ7-wrbSNbFTBbXkiqk9CyGMxtHwTRte6lsfyaE-yNo282SOVh_JYKz41hWtJ0EHUoiorIeRhLzU1FVF9PNTElbBwEDwq5_feP8Z9iH3hUpq5LQUJIQqvNPu0riHROl4gWjYytgthp-c-wUF4l3L6vCK77Lm9rNuwJvj3weG_Z1bM0bdDzve0DICuQNfe5WHWexNGoOsic_vs7jF8Z5OBrqvtBHTdnD9a-h0AAP__mG4P-Q">