diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-09-10 14:04:28 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2015-09-10 14:04:28 +0000 |
commit | 1ce8ee743ff570443f520e68afedea03ae664a64 (patch) | |
tree | 9148db89d4a4a18aecee33599859564a427dcac2 | |
parent | 47b653bd9f7fa1a34bddeec249d8ca65e5a00c15 (diff) | |
download | gcc-1ce8ee743ff570443f520e68afedea03ae664a64.zip gcc-1ce8ee743ff570443f520e68afedea03ae664a64.tar.gz gcc-1ce8ee743ff570443f520e68afedea03ae664a64.tar.bz2 |
S/390: Don't use vgm for v1ti and v1tf.
gcc/ChangeLog:
2015-09-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_contiguous_bitmask_vector_p): Reject if
the vector element is bigger than 64 bit.
gcc/testsuite/ChangeLog:
2015-09-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/vector/vec-genbytemask-1.c: Add check for V1TI
initialization with a byte mask. No change expected here.
* gcc.target/s390/vector/vec-genmask-1.c: Fix whitespace.
* gcc.target/s390/vector/vec-genmask-2.c: Add check for V1TI
initialization with contigious bitmask. Literal pool is expectd
to be used here.
From-SVN: r227637
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/vector/vec-genbytemask-1.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/vector/vec-genmask-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c | 9 |
6 files changed, 41 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aff3fd9..14e8f5e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2015-09-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * config/s390/s390.c (s390_contiguous_bitmask_vector_p): Reject if + the vector element is bigger than 64 bit. + +2015-09-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + * config/s390/vx-builtins.md ("vec_vmal<mode>", "vec_vmah<mode>") ("vec_vmalh<mode>"): Change mode iterator from VI_HW to VI_HW_QHS. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index a664443..d276ab2 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -2265,6 +2265,11 @@ s390_contiguous_bitmask_vector_p (rtx op, int *start, int *end) return false; size = GET_MODE_UNIT_BITSIZE (GET_MODE (op)); + + /* We cannot deal with V1TI/V1TF. This would require a vgmq. */ + if (size > 64) + return false; + mask = UINTVAL (elt); if (s390_contiguous_bitmask_p (mask, size, start, end != NULL ? &length : NULL)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2272a67..aee33f6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2015-09-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com> + + * gcc.target/s390/vector/vec-genbytemask-1.c: Add check for V1TI + initialization with a byte mask. No change expected here. + * gcc.target/s390/vector/vec-genmask-1.c: Fix whitespace. + * gcc.target/s390/vector/vec-genmask-2.c: Add check for V1TI + initialization with contigious bitmask. Literal pool is expectd + to be used here. + 2015-09-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/67439 diff --git a/gcc/testsuite/gcc.target/s390/vector/vec-genbytemask-1.c b/gcc/testsuite/gcc.target/s390/vector/vec-genbytemask-1.c index b8cf314..26c189a 100644 --- a/gcc/testsuite/gcc.target/s390/vector/vec-genbytemask-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/vec-genbytemask-1.c @@ -1,11 +1,13 @@ /* { dg-do run } */ /* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */ /* { dg-require-effective-target vector } */ +/* { dg-require-effective-target int128 } */ typedef unsigned char uv16qi __attribute__((vector_size(16))); typedef unsigned short uv8hi __attribute__((vector_size(16))); typedef unsigned int uv4si __attribute__((vector_size(16))); typedef unsigned long long uv2di __attribute__((vector_size(16))); +typedef unsigned __int128 uv1ti __attribute__((vector_size(16))); uv2di __attribute__((noinline)) foo1 () @@ -45,6 +47,13 @@ foo4 () 0xff, 0, 0xff, 0, 0, 0xff, 0, 0xff }; } + +uv1ti __attribute__((noinline)) +foo5 () +{ + return (uv1ti){ 0xff00ff00ff00ff00ULL }; +} + /* { dg-final { scan-assembler-times "vgbm\t%v24,61605" 1 } } */ int @@ -64,6 +73,10 @@ main () if (foo4()[1] != 0xff) __builtin_abort (); + + if (foo5()[0] != 0xff00ff00ff00ff00ULL) + __builtin_abort (); + return 0; } diff --git a/gcc/testsuite/gcc.target/s390/vector/vec-genmask-1.c b/gcc/testsuite/gcc.target/s390/vector/vec-genmask-1.c index b0747f7..6093422 100644 --- a/gcc/testsuite/gcc.target/s390/vector/vec-genmask-1.c +++ b/gcc/testsuite/gcc.target/s390/vector/vec-genmask-1.c @@ -66,4 +66,3 @@ main () __builtin_abort (); return 0; } - diff --git a/gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c b/gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c index e3ae341..46256e9 100644 --- a/gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c +++ b/gcc/testsuite/gcc.target/s390/vector/vec-genmask-2.c @@ -1,10 +1,12 @@ /* { dg-do compile } */ /* { dg-options "-O3 -mzarch -march=z13" } */ +/* { dg-require-effective-target int128 } */ typedef unsigned char uv16qi __attribute__((vector_size(16))); typedef unsigned short uv8hi __attribute__((vector_size(16))); typedef unsigned int uv4si __attribute__((vector_size(16))); typedef unsigned long long uv2di __attribute__((vector_size(16))); +typedef unsigned __int128 uv1ti __attribute__((vector_size(16))); /* The elements differ. */ uv2di __attribute__((noinline)) @@ -43,4 +45,11 @@ foo4 () 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82 }; } + +/* We do not have vgmq. */ +uv1ti +foo5() +{ + return (uv1ti){ ((unsigned __int128)1 << 53) - 1 }; +} /* { dg-final { scan-assembler-not "vgm" } } */ |