This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] vectorizer: fix handling of non VECTOR_MODE_P vectypes
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com, Richard Henderson <rth at redhat dot com>
- Date: Wed, 13 Oct 2004 10:19:59 +0200
- Subject: Re: [patch] vectorizer: fix handling of non VECTOR_MODE_P vectypes
> This doesn't look right. Why do you need -mpowerpc64?
because I get different failures if I use -mpowerpc64 or not.
that's why I have two tests that use -mpowerpc64 and two tests that don't.
> Or even
> -fdump-tree-vect-stats if this a runtime test?
because I also want to verify that nothing got vectorized; so I will also
have this at the end of each of these testcases:
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
dorit
ja2morri@csclub.u
waterloo.ca To: Dorit Naishlos/Haifa/IBM@IBMIL
(James A. cc: Richard Henderson <rth@redhat.com>, gcc-patches@gcc.gnu.org,
Morrison) mark@codesourcery.com
Subject: Re: [patch] vectorizer: fix handling of non VECTOR_MODE_P
12/10/2004 22:39 vectypes
Dorit Naishlos <DORIT@il.ibm.com> writes:
> > Test case?
>
> Sure:
>
> Tests vect-[82,83].c below currently ICE.
> If compiled in addition with -mpowerpc64 (testcases vect-[82,83]_64.c),
> then they don't ICE: vect-82_64.c passes ok, and vect-83_64.c produces
> wrong results.
> With the patch (that disables vectorization in this case), the tests will
> pass, but we lose the opportunity to vectorize vect-82_64.c (which may
not
> be so terrible cause we may want to convert this loop to a call to memset
> instead).
>
> dorit
>
> =====================================
> vect-82.c:
> /* { dg-do run { target powerpc*-*-* } } */
> /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" {
> target powerpc*-*-* } } */
This doesn't look right. Why do you need -mpowerpc64? Or even
-fdump-tree-vect-stats if this a runtime test?
> #include <stdarg.h>
> #include "tree-vect.h"
>
> #define N 16
>
> int main1 ()
> {
> long long unsigned int ca[N];
> int i;
>
> for (i = 0; i < N; i++)
> ca[i] = 0;
>
> /* check results: */
> for (i = 0; i < N; i++)
> {
> if (ca[i] != 0)
> abort ();
> }
>
> return 0;
> }
>
> int main (void)
> {
> check_vect ();
> return main1 ();
> }
> =====================================
> vect-83.c:
> /* { dg-do run { target powerpc*-*-* } } */
> /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" {
> target powerpc*-*-* } } */
>
> #include <stdarg.h>
> #include "tree-vect.h"
>
> #define N 16
>
> int main1 ()
> {
> long long unsigned int ca[N];
> int i;
>
> for (i = 0; i < N; i++)
> ca[i] = 2;
>
> /* check results: */
> for (i = 0; i < N; i++)
> {
> if (ca[i] != 2)
> abort ();
> }
>
> return 0;
> }
>
> int main (void)
> {
> check_vect ();
> return main1 ();
> }
> =====================================
> vect-82_64.c:
> /* { dg-do run { target powerpc*-*-* } } */
> /* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats
> -maltivec" { target powerpc*-*-* } } */
>
> #include <stdarg.h>
> #include "tree-vect.h"
>
> #define N 16
>
> int main1 ()
> {
> long long unsigned int ca[N];
> int i;
>
> for (i = 0; i < N; i++)
> ca[i] = 0;
>
> /* check results: */
> for (i = 0; i < N; i++)
> {
> if (ca[i] != 0)
> abort ();
> }
>
> return 0;
> }
>
> int main (void)
> {
> check_vect ();
> return main1 ();
> }
> =====================================
> vect-83_64.c:
> /* { dg-do run { target powerpc*-*-* } } */
> /* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats
> -maltivec" { target powerpc*-*-* } } */
> #include <stdarg.h>
> #include "tree-vect.h"
>
> #define N 16
>
> int main1 ()
> {
> long long unsigned int ca[N];
> int i;
>
> for (i = 0; i < N; i++)
> ca[i] = 2;
>
> /* check results: */
> for (i = 0; i < N; i++)
> {
> if (ca[i] != 2)
> abort ();
> }
>
> return 0;
> }
>
> int main (void)
> {
> check_vect ();
> return main1 ();
> }
--
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim