From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12766 invoked by alias); 13 Oct 2004 08:20:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 12748 invoked from network); 13 Oct 2004 08:19:57 -0000 Received: from unknown (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org with SMTP; 13 Oct 2004 08:19:57 -0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.12.10/8.12.10) with ESMTP id i9D8JqfQ166438; Wed, 13 Oct 2004 08:19:52 GMT Received: from d12ml102.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9D8JpgC118592; Wed, 13 Oct 2004 10:19:52 +0200 In-Reply-To: Subject: Re: [patch] vectorizer: fix handling of non VECTOR_MODE_P vectypes To: ja2morri@csclub.uwaterloo.ca (James A. Morrison) Cc: gcc-patches@gcc.gnu.org, mark@codesourcery.com, Richard Henderson Message-ID: From: Dorit Naishlos Date: Wed, 13 Oct 2004 08:46:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-SW-Source: 2004-10/txt/msg01082.txt.bz2 > 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 , 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 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 > #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 > #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 > #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 > #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