This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix various vectorizer regressions my recent patch caused (PR middle-end/51590)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Guenther <rguenther at suse dot de>, Ira Rosen <ira dot rosen at linaro dot org>
- Date: Mon, 19 Dec 2011 20:15:50 +0100
- Subject: Re: [PATCH] Fix various vectorizer regressions my recent patch caused (PR middle-end/51590)
- References: <20111219135927.GD1957@tyan-ft48-01.lab.bos.redhat.com>
> 2011-12-19 Jakub Jelinek <jakub@redhat.com>
>
> PR middle-end/51590
> PR tree-optimization/51606
> * tree-vect-patterns.c (append_pattern_def_seq, new_pattern_def_seq):
> New inline functions.
> (vect_recog_over_widening_pattern,
> vect_recog_vector_vector_shift_pattern,
> vect_recog_sdivmod_pow2_pattern, vect_recog_mixed_size_cond_pattern,
> adjust_bool_pattern_cast, vect_recog_bool_pattern): Use them.
This has very likely fixed PR tree-optimization/51580 as well. Thanks.
I've added the Ada testcase to the testsuite.
2011-12-19 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/51580
* gnat.dg/specs/loop_optimization1.ads: New test.
* gnat.dg/specs/loop_optimization1_pkg.ad[sb]: New helper.
--
Eric Botcazou
-- { dg-do compile }
-- { dg-options "-O3" }
with Loop_Optimization1_Pkg;
package Loop_Optimization1 is
type Kind_Type is (One, Two, Three, Four);
type Array_Type is array (Kind_Type) of Boolean;
pragma Pack (Array_Type);
package Q is new Loop_Optimization1_Pkg (Boolean, Kind_Type, Array_Type);
end Loop_Optimization1;
-- { dg-excess-errors "no code generated" }
generic
type Element_Type is private;
type Index_Type is (<>);
type Constrained_Array_Type is array (Index_Type) of Element_Type;
package Loop_Optimization1_Pkg is
procedure Proc (CA : in out Constrained_Array_Type);
end Loop_Optimization1_Pkg;
package body Loop_Optimization1_Pkg is
type Unconstrained_Array_Type
is array (Index_Type range <>) of Element_Type;
procedure Local (UA : in out Unconstrained_Array_Type) is
begin
null;
end;
procedure Proc (CA : in out Constrained_Array_Type) is
begin
Local (Unconstrained_Array_Type (CA));
end;
end Loop_Optimization1_Pkg;