re PR tree-optimization/40071 (ICE (aliasing assert) in vectorizable_store at tree-vect-stmts.c:3117)
PR tree-optimization/40071 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Build a ref-all pointer if the original data reference doesn't conflict with the created vector data reference. Fix long line. From-SVN: r152585
This commit is contained in:
parent
857607344f
commit
3f49ba3f41
@ -1,3 +1,10 @@
|
||||
2009-10-09 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR tree-optimization/40071
|
||||
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Build a ref-all
|
||||
pointer if the original data reference doesn't conflict with the
|
||||
created vector data reference. Fix long line.
|
||||
|
||||
2009-10-09 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (any_div): New code iterator.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-10-09 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/opt3.adb: New test.
|
||||
* gnat.dg/opt3_pkg.ads: New helper.
|
||||
|
||||
2009-10-08 Doug Kwan <dougkwan@google.com>
|
||||
|
||||
PR rtl-optimization/41574
|
||||
|
11
gcc/testsuite/gnat.dg/opt3.adb
Normal file
11
gcc/testsuite/gnat.dg/opt3.adb
Normal file
@ -0,0 +1,11 @@
|
||||
-- { dg-do compile }
|
||||
-- { dg-options "-O3" }
|
||||
|
||||
with Opt3_Pkg; use Opt3_Pkg;
|
||||
|
||||
procedure Opt3 is
|
||||
type Buffer_Type is array (Integer range <> ) of Short_Integer;
|
||||
B : Buffer_Type (1 .. 256) := (others => 0);
|
||||
begin
|
||||
F (B(1));
|
||||
end;
|
5
gcc/testsuite/gnat.dg/opt3_pkg.ads
Normal file
5
gcc/testsuite/gnat.dg/opt3_pkg.ads
Normal file
@ -0,0 +1,5 @@
|
||||
package Opt3_Pkg is
|
||||
|
||||
procedure F (I : Short_Integer);
|
||||
|
||||
end Opt3_Pkg;
|
@ -2369,9 +2369,20 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
|
||||
vect_ptr_type = build_pointer_type (vectype);
|
||||
vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
|
||||
get_name (base_name));
|
||||
/* If any of the data-references in the stmt group does not conflict
|
||||
with the created vector data-reference use a ref-all pointer instead. */
|
||||
if (STMT_VINFO_DR_GROUP_SIZE (stmt_info) > 1)
|
||||
|
||||
/* Vector types inherit the alias set of their component type by default so
|
||||
we need to use a ref-all pointer if the data reference does not conflict
|
||||
with the created vector data reference because it is not addressable. */
|
||||
if (!alias_sets_conflict_p (get_deref_alias_set (vect_ptr),
|
||||
get_alias_set (DR_REF (dr))))
|
||||
{
|
||||
vect_ptr_type = build_pointer_type_for_mode (vectype, ptr_mode, true);
|
||||
vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
|
||||
get_name (base_name));
|
||||
}
|
||||
|
||||
/* Likewise for any of the data references in the stmt group. */
|
||||
else if (STMT_VINFO_DR_GROUP_SIZE (stmt_info) > 1)
|
||||
{
|
||||
gimple orig_stmt = STMT_VINFO_DR_GROUP_FIRST_DR (stmt_info);
|
||||
do
|
||||
@ -2380,10 +2391,11 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
|
||||
if (!alias_sets_conflict_p (get_deref_alias_set (vect_ptr),
|
||||
get_alias_set (lhs)))
|
||||
{
|
||||
vect_ptr_type = build_pointer_type_for_mode (vectype,
|
||||
ptr_mode, true);
|
||||
vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
|
||||
get_name (base_name));
|
||||
vect_ptr_type
|
||||
= build_pointer_type_for_mode (vectype, ptr_mode, true);
|
||||
vect_ptr
|
||||
= vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
|
||||
get_name (base_name));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user