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

--- Comment #1 from Steven Munroe <munroesj at gcc dot gnu.org> ---
Similarly doe _mm_slli_epi64 for any const value > 15 and < 32. So:


      if (__builtin_constant_p(__B))
        {
          if (__B < 32)
              lshift = (__v2du) vec_splat_s32(__B);
            else
              lshift = (__v2du) vec_splats((unsigned long long)__B);
        }
      else
          lshift = (__v2du) vec_splats ((unsigned int) __B);

should be something like:

      if (__builtin_constant_p(__B) && (__B < 16))
        {
          lshift = (__v2du) vec_splat_s32(__B);
        }
      else
      lshift = (__v2du) vec_splats ((unsigned int) __B);


It is Ok in this case to use a splat word form because the vector shift left
doubleword will only use the low order 6-bits of of each doubleword of the
shift vctor.

Reply via email to