From 5b37159fcab6712970305bad6ecea7928b86ab63 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Tue, 22 Aug 2017 15:40:23 +0000 Subject: [PATCH] fold-vec-sums-int.c: New. [gcc/testsuite] 2017-08-22 Will Schmidt * gcc.target/powerpc/fold-vec-sums-int.c: New. From-SVN: r251281 --- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.target/powerpc/fold-vec-sums-int.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 531d0f95ae7..45a2ac0abf7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-08-22 Will Schmidt + + * gcc.target/powerpc/fold-vec-sums-int.c: New. + 2017-08-22 Jeff Law PR tree-optimization/81741 diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c new file mode 100644 index 00000000000..e1047facbff --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-sums-int.c @@ -0,0 +1,16 @@ +/* Verify that overloaded built-ins for vec_sums with int + inputs produce the right code. */ + +/* { dg-do compile } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec -O2" } */ + +#include + +vector signed int +test_vec_sums (vector signed int vsi2, vector signed int vsi3) +{ + return vec_sums (vsi2, vsi3); +} + +/* { dg-final { scan-assembler-times "vsumsws" 1 } } */ -- 2.30.2