From 4bfb347c0249384240209d0f414eaef5ac5adc48 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Tue, 30 May 2017 11:00:50 +0000 Subject: [PATCH] Vector peeling cost model 5/6 gcc/testsuite/ChangeLog: 2017-05-30 Robin Dapp * gcc.target/s390/vector/vec-nopeel-2.c: New test. From-SVN: r248679 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/s390/vector/vec-nopeel-2.c | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/gcc.target/s390/vector/vec-nopeel-2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0ae60f0c952..79bb197a130 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-05-30 Robin Dapp + + * gcc.target/s390/vector/vec-nopeel-2.c: New test. + 2017-05-30 Jozef Lawrynowicz PR target/78838 diff --git a/gcc/testsuite/gcc.target/s390/vector/vec-nopeel-2.c b/gcc/testsuite/gcc.target/s390/vector/vec-nopeel-2.c new file mode 100644 index 00000000000..9b67793e6f4 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/vector/vec-nopeel-2.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target s390_vx } */ +/* { dg-options "-O2 -mzarch -march=z13 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */ + +void foo(int *restrict a, int *restrict b, unsigned int n) +{ + for (unsigned int i = 0; i < n; i++) + b[i] = a[i] * 2 + 1; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" } } */ -- 2.30.2