On Sat, 6 Jun 2015, DJ Delorie wrote:
On targets with 2 byte "int" the vectors are 16 values long, which
breaks the index count in __builtin_shuffle() using more than one
input vector. Ok?
* gcc.dg/pr64252.c: Fix assumption about sizeof(int).
2015-06-05 Thomas Koenig <tkoe...@gcc.gnu.org>
Index: gcc.dg/pr64252.c
===================================================================
--- gcc.dg/pr64252.c (revision 224181)
+++ gcc.dg/pr64252.c (working copy)
@@ -1,11 +1,11 @@
/* PR target/64252 */
/* { dg-do run } */
/* { dg-options "-O2" } */
-typedef unsigned int V __attribute__((vector_size (32)));
+typedef unsigned int V __attribute__((vector_size (sizeof(unsigned long) *
8)));
Why 'unsigned long' and not 'unsigned int'? Doesn't that break platforms
where long and int have a different size?
__attribute__((noinline, noclone)) void
foo (V *a, V *b, V *c, V *d, V *e)
{
V t = __builtin_shuffle (*a, *b, *c);
V v = __builtin_shuffle (t, (V) { ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U },
(V) { 0, 1, 8, 3, 4, 5, 9, 7 });
--
Marc Glisse