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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Clang crashes when using SSE4.1 intrinsics without -msse4.1 flag
        </td>
    </tr>

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

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

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

<pre>
    Clang crashes when using SSE4.1 intrinsics (like _mm_blendv_epi8) without the appropriate target flag (-msse4.1), while GCC correctly provides a clear diagnostic message.
Repro: https://godbolt.org/z/x1Wvc98b1

## Program
```cpp
#include <immintrin.h>

const int8_t scalarValue = 1;
__m128i vector1 = _mm_set1_epi8(scalarValue);
__m128i vector2 = _mm_set1_epi8(2);
__m128i vector3 = _mm_set1_epi8(3);
__m128i resultVector = _mm_blendv_epi8(vector2, vector3, vector1);
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk09vpDgQxT-NuZSC7DIQOHDodMJeVxspO7eWMQV4xmBkm85kPv0IupPMn8xhJEsgu96z6tXPKgQzzEQ1y-9Yfp-oNY7O159mo1zSuu6lPlo1D6C9CiMFeB5phjWYeYDHx4csFWDm6M0cjA7AsLTmC8Fpmk6tpbk7n2gxJcMKnk0c3RohjgRqWbxbvFGRICo_UITeqmGT30whUJYKhhXDIzyPxhL8czyCdt6TjvYFFu_OpqMACrQl5aEzaphdiEbDRCGogVLGD__R4h2TBxhjXAKTB4YNw2ZwXetsTJ0fGDbfGDZfxf9nXZWtYPywLZQMJfzr3eDVtG0U_LL0slzOzazt2hEweTTTdOk_HZl8uDhoN4e4xVKeIgStrPJPyq5b_T0IJu8YP5xOk8DSwJl0dF7sR1tqgaK4Zlb-IN3i-ECHH-rwD9Xyw2r5W7WnsNr4tGveJD-Ns7xev43o6v3-K94M35JLulp2laxUQrW4zTMuskzyZKzzWy76outEn2GXF3SbUVXpru-l6ItetYmpkWPOSy44CpnztMIi110hlCixJFWwjNOkjE2tPU_bVBMTwkq1yEWBMrGqJRt2uBH1RjJD3Dj39Sa4adchsIxbE2J4t4gm2v1F7Oyz_B7-4hG8kv6K8s52snpb_0KiiePaptpNDJvt6uvnZvHuM-nIsNlbCQybazfnGr8HAAD__yY_Kug">