https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123117

--- Comment #3 from chenglulu <chenglulu at loongson dot cn> ---
#include <stdio.h>
#include <lsxintrin.h>

#define BS_VEC(type, num) type __attribute__((vector_size(num * sizeof(type))))

int main ()
{
  BS_VEC(long int, 2) BS_VAR_0[1] = {};
  BS_VEC (unsigned int, 4) tt = (BS_VEC(unsigned int, 4))
__lsx_vadd_w((__m128i){2655507415, 0, 0, 0}, (__m128i){});
  BS_VEC(unsigned int, 2) SHUF = __builtin_shufflevector(tt, (BS_VEC(unsigned
int, 4)){}, 0, 1);
  BS_VAR_0[0] = __builtin_convertvector(SHUF, BS_VEC(long int, 2));
  printf("res[0] is 0x%016llx\n", BS_VAR_0[0][0], BS_VAR_0[0][1]);
}

This small test case can reproduce the problem above.

Reply via email to