title: How to constexpr initialize intrinsic SSE/AVX register?
body: <p>Consider something like <code>__m128i xmm_stuff = _mm_set_epi32(1, 2, 3, 4);</code> it could be <code>const</code> but not <code>consexpr</code> because of an underlying <code>reinterpret_cast</code> in the compiler implementations.  And the fact that intrinsics are function which aren't declared <code>constexpr</code>.<br />
  For example, from clang-12's immintrin.h:</p>
  <pre><code>static __inline__ __m128i __DEFAULT_FN_ATTRS
  _mm_set_epi32(int __i3, int __i2, int __i1, int __i0)
  {
    return __extension__ (__m128i)(__v4si){ __i0, __i1, __i2, __i3};
  }
  </code></pre>
  <hr />
  <h5>Is the some cunning (and portable) way to initialize <code>__m128i</code> and such as <code>constexpr</code>?</h5>
  <p>Actual usage</p>
  <pre><code>constexpr std::array&lt;int32_t,4&gt; input = {1, 2, 3, 4};
  const __m128i xmm_input = _mm_load_si128(reinterpret_cast&lt;const __m128i*&gt;(input.data()));
  </code></pre>
  <p>Desired usage, more concise and clear:</p>
  <pre><code>constexpr __m128i xmm_input = {1, 2, 3, 4};
  </code></pre>