diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/vector/vcond-shift.c | 34 |
2 files changed, 28 insertions, 11 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 39121e0..c353008 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-04-03 Robin Dapp <rdapp@linux.vnet.ibm.com> + + * gcc.target/s390/vector/vcond-shift.c (foo, foo2, foo3, baz, baf) + (bal): Increase iteration count and assume alignment. + 2017-04-03 Bin Cheng <bin.cheng@arm.com> * gcc.dg/tree-ssa/pr71347.c: Add predcom and drop XFAILs. diff --git a/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c b/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c index f58bd1f..cc40153 100644 --- a/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c +++ b/gcc/testsuite/gcc.target/s390/vector/vcond-shift.c @@ -11,51 +11,63 @@ /* { dg-final { scan-assembler "vesrlh\t%v.?,%v.?,15" } } */ /* { dg-final { scan-assembler "vesrlb\t%v.?,%v.?,7" } } */ -#define SZ 4 -#define SZ2 8 -#define SZ3 16 +#define SZ 8 +#define SZ2 16 +#define SZ3 32 void foo(int *w) { int i; - /* Should expand to (w + (w < 0 ? 1 : 0)) >> 1 - which in turn should get simplified to (w + (w >> 31)) >> 1. */ + int *ww = __builtin_assume_aligned (w, 8); + + /* Should expand to (ww + (ww < 0 ? 1 : 0)) >> 1 + which in turn should get simplified to (ww + (ww >> 31)) >> 1. */ for (i = 0; i < SZ; i++) - w[i] = w[i] / 2; + ww[i] = ww[i] / 2; } void foo2(short *w) { int i; + short *ww = __builtin_assume_aligned (w, 8); + for (i = 0; i < SZ2; i++) - w[i] = w[i] / 2; + ww[i] = ww[i] / 2; } void foo3(signed char *w) { int i; + signed char *ww = __builtin_assume_aligned (w, 8); + for (i = 0; i < SZ3; i++) - w[i] = w[i] / 2; + ww[i] = ww[i] / 2; } int baz(int *x) { int i; + int *xx = __builtin_assume_aligned (x, 8); + for (i = 0; i < SZ; i++) - x[i] = x[i] < 0 ? -1 : 0; + xx[i] = xx[i] < 0 ? -1 : 0; } int baf(short *x) { int i; + short *xx = __builtin_assume_aligned (x, 8); + for (i = 0; i < SZ2; i++) - x[i] = x[i] >= 0 ? 0 : 1; + xx[i] = xx[i] >= 0 ? 0 : 1; } int bal(signed char *x) { int i; + signed char *xx = __builtin_assume_aligned (x, 8); + for (i = 0; i < SZ3; i++) - x[i] = x[i] >= 0 ? 0 : -1; + xx[i] = xx[i] >= 0 ? 0 : -1; } |