This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR25500, pessimization on SSE code caused by count_type_elements (expr.c)

Paolo Bonzini wrote:

> 2006-08-07  Paolo Bonzini  <>
> 	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?

Mark Mitchell
(650) 331-3385 x713

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]