This is the mail archive of the gcc-patches@gcc.gnu.org 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] Avoid changing DR for scatter/gather refs


> 2018-06-21  Richard Biener  <rguenther@suse.de>
> 
> 	* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
> 	* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
> 	Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
> 	(vect_analyze_data_ref_dependence): Re-order checks to deal with
> 	NULL DR_STEP.
> 	(vect_record_base_alignments): Do not record base alignment
> 	for gathers or scatters.
> 	(vect_compute_data_ref_alignment): Drop return value that is always
> 	true.  Bail out early for gathers or scatters.
> 	(vect_enhance_data_refs_alignment): Bail out early for gathers
> 	or scatters.
> 	(vect_find_same_alignment_drs): Likewise.
> 	(vect_analyze_data_refs_alignment): Remove dead code.
> 	(vect_slp_analyze_and_verify_node_alignment): Likewise.
> 	(vect_analyze_data_refs): For possible gathers or scatters do
> 	not create an alternate DR, just check their possible validity
> 	and mark them.  Adjust DECL_NONALIASED handling to not rely
> 	on DR_BASE_ADDRESS.
> 	* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
> 	update inits of gathers or scatters.
> 	* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
> 	Also copy gather/scatter flag to pattern vinfo.

This breaks the attached testcase sso9.adb compiled at -O3:

+===========================GNAT BUG DETECTED==============================+
| 9.0.0 20180621 (experimental) [trunk revision 261832] (x86_64-suse-linux) 
GCC error:|
| in vect_check_gather_scatter, at tree-vect-data-refs.c:3733              |
| Error detected around /home/eric/svn/gcc/gcc/testsuite/gnat.dg/sso9.adb:6:1|
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |

-- 
Eric Botcazou
with System;

package SSO9_Pkg is

   type Rec (D : Boolean := False) is record
      B : Boolean;
   end record;

   for Rec'Bit_Order use System.High_Order_First;
   for Rec'Scalar_Storage_Order use System.High_Order_First;

   type Arr is array (1 .. 16) of Rec;

   procedure Proc (A : Arr);

end SSO9_Pkg;
-- { dg-do compile }
-- { dg-options "-O3 -gnatws" }

with SSO9_Pkg; use SSO9_Pkg;

procedure SSO9 is
   A : Arr;
begin
   Proc (A);
end;

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