public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] Fix up vectoriser dumping and scanning in some tests
@ 2014-09-02 15:33 Kyrill Tkachov
  0 siblings, 0 replies; only message in thread
From: Kyrill Tkachov @ 2014-09-02 15:33 UTC (permalink / raw)
  To: GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

Hi all,

I noticed for some reason that these tests don't properly dump the 
vectoriser pass before scanning, but it doesn't show up because the 
corresponding target predicate in the scan-tree-dump directive was never 
true on arm!
I think these tests were initially supposed to go somewhere in the 
midend but ended up being in gcc.target/arm/.
Since they're in gcc.target/arm, just add the ARMv8 NEON options and 
expect it to always vectorise.

These tests pass on arm just fine with these changes.

Ok for trunk?

2014-09-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.target/arm/vect-rounding-btruncf.c: Dump vectoriser output.
     Remove restriction on tree dump scan.
     * gcc.target/arm/vect-rounding-ceilf.c: Likewise.
     * gcc.target/arm/vect-rounding-floorf.c: Likewise.
     * gcc.target/arm/vect-rounding-roundf.c: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm-vect-tests.patch --]
[-- Type: text/x-patch; name=arm-vect-tests.patch, Size: 3777 bytes --]

commit 0a1ce57744f00efd14b93b8f6decb6d5eff20c66
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Aug 22 17:25:29 2014 +0100

    [ARM] Fix testsuite flags for vect tests

diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
index ff033d4..5616837 100644
--- a/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -fdump-tree-vect-all" } */
 /* { dg-add-options arm_v8_neon } */
 
 #define N 32
@@ -14,5 +14,5 @@ foo (float *output, float *input)
     output[i] = __builtin_truncf (input[i]);
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_btruncf } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
index b54f358..cb8f1d5 100644
--- a/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -fdump-tree-vect-all" } */
 /* { dg-add-options arm_v8_neon } */
 
 #define N 32
@@ -14,5 +14,5 @@ foo (float *output, float *input)
     output[i] = __builtin_ceilf (input[i]);
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_ceilf } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
index 02e188d..bf68af7 100644
--- a/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -fdump-tree-vect-all" } */
 /* { dg-add-options arm_v8_neon } */
 
 #define N 32
@@ -14,5 +14,5 @@ foo (float *output, float *input)
     output[i] = __builtin_floorf (input[i]);
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_floorf } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c
index 85e2058..7c0a1b4 100644
--- a/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_v8_neon_ok } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -fdump-tree-vect-all" } */
 /* { dg-add-options arm_v8_neon } */
 
 #define N 32
@@ -14,5 +14,5 @@ foo (float *output, float *input)
     output[i] = __builtin_roundf (input[i]);
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_roundf } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-02 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02 15:33 [PATCH][ARM] Fix up vectoriser dumping and scanning in some tests Kyrill Tkachov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).