This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR25500, pessimization on SSE code caused by count_type_elements (expr.c)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Wed, 16 Aug 2006 17:07:53 -0700
- Subject: Re: [PATCH] Fix PR25500, pessimization on SSE code caused by count_type_elements (expr.c)
- References: <44D729AA.firstname.lastname@example.org>
Paolo Bonzini wrote:
> 2006-08-07 Paolo Bonzini <email@example.com>
> PR tree-optimization/25500
> * expr.c (count_type_elements): Treat non-BLKmode vectors as a
> single element.
> Index: expr.c
> --- expr.c (revision 115990)
> +++ expr.c (working copy)
> @@ -4763,7 +4763,7 @@ count_type_elements (tree type, bool all
> return 2;
> case VECTOR_TYPE:
> - return TYPE_VECTOR_SUBPARTS (type);
> + return TYPE_MODE (type) == BLKmode ? TYPE_VECTOR_SUBPARTS (type) : 1;
> case INTEGER_TYPE:
> case REAL_TYPE:
While I applaud the results of this patch, this doesn't really make
sense to me. A vector has as many elements as it has, whether or not it
fits in a machine register. That's a philosophical concern, but more
practically, won't gimplify_init_constructor break?
Is it possible to instead teach the SRA code to handle this case specially?
(650) 331-3385 x713