This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, testsuite] Fix g++.dg/vect/pr36648.cc for vect_no_align.
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Nov 2008 14:53:16 -0800 (PST)
- Subject: [Patch, testsuite] Fix g++.dg/vect/pr36648.cc for vect_no_align.
This test is trying to vectorize an explicitly non-aligned vector and
that will only work on machines that support it so we need to check
vect_no_align. I think the reason that it initially worked and then
started failing after a seemingly unrelated change was that the
alignment check was being done on the wrong object and then it got fixed
with version r141547. Once it started doing the check correctly the
test would not get vectorized on systems that did not support it.
vect_no_align is true for ia64, arm, and sparc. I saw failures for ia64
and arm on the gcc-testresults list but not for sparc. But sparc doesn't
seem to support floating point vectors (according to vect_float) so the test
wouldn't run on sparc.
Vectorizing verbose output before 141547:
pr36648.cc:10: note: vect_model_store_cost: inside_cost = 3, outside_cost = 1 .
pr36648.cc:10: note: Alignment of access forced using versioning.
pr36648.cc:10: note: cost model disabled.
pr36648.cc:10: note: Vectorization may not be profitable.
Vectorizing verbose output after 141547:
pr36648.cc:10: note: vect_model_store_cost: inside_cost = 3, outside_cost = 1 .
pr36648.cc:10: note: not vectorized: unsupported unaligned store.
pr36648.cc:18: note: vectorized 0 loops in function.
Ok to check in this change to the testcase? Tested on IA64 HP-UX.
Steve Ellcey
sje@cup.hp.com
2008-11-13 Steve Ellcey <sje@cup.hp.com>
PR middle-end/38004
* g++.dg/vect/pr36648.cc: Check alignment requirement.
Index: g++.dg/vect/pr36648.cc
===================================================================
--- g++.dg/vect/pr36648.cc (revision 141817)
+++ g++.dg/vect/pr36648.cc (working copy)
@@ -17,8 +17,8 @@ Foo foo;
int main() { }
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }*/
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! vect_no_align } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */