Skip to content

Commit

Permalink
Work around PR43337: don't try to use the vec_sel overloads for vecto…
Browse files Browse the repository at this point in the history
…r long long, since clang's <altivec.h> doesn't provide it yet!

(cherry picked from commit 388eaa1)
  • Loading branch information
zygoloid authored and zmodem committed Jan 17, 2020
1 parent ac2c2db commit fdb501e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Headers/ppc_wrappers/emmintrin.h
Expand Up @@ -1749,7 +1749,7 @@ _mm_sll_epi64 (__m128i __A, __m128i __B)
lshift = vec_splat ((__v2du) __B, 0);
shmask = vec_cmplt (lshift, shmax);
result = vec_sl ((__v2du) __A, lshift);
result = vec_sel ((__v2du) shmask, result, shmask);
result = (__v2du)vec_sel ((__v2df) shmask, (__v2df)result, shmask);

return (__m128i) result;
}
Expand Down Expand Up @@ -1843,7 +1843,7 @@ _mm_srl_epi64 (__m128i __A, __m128i __B)
rshift = vec_splat ((__v2du) __B, 0);
shmask = vec_cmplt (rshift, shmax);
result = vec_sr ((__v2du) __A, rshift);
result = vec_sel ((__v2du) shmask, result, shmask);
result = (__v2du)vec_sel ((__v2df) shmask, (__v2df)result, shmask);

return (__m128i) result;
}
Expand Down

0 comments on commit fdb501e

Please sign in to comment.