From: Richard Biener Date: Thu, 17 Dec 2015 12:34:27 +0000 (+0000) Subject: re PR tree-optimization/68951 (ICE in vect_update_misalignment_for_peel) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ee38286c3f26eeacf79090d5a75643a2a1c0697;p=gcc.git re PR tree-optimization/68951 (ICE in vect_update_misalignment_for_peel) 2015-12-17 Richard Biener PR tree-optimization/68951 * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Ignore strided non-group accesses. * gcc.dg/torture/pr68951.c: New testcase. From-SVN: r231754 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 375ab755e80..46cf0b0862c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-12-17 Richard Biener + + PR tree-optimization/68951 + * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): + Ignore strided non-group accesses. + 2015-12-17 Andrew Burgess * config/arc/arc.c (arc_loop_hazard): Don't convert the jump label diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 674c868cf11..fafa8cc4dec 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-17 Richard Biener + + PR tree-optimization/68951 + * gcc.dg/torture/pr68951.c: New testcase. + 2015-12-17 Rainer Orth PR target/67973 diff --git a/gcc/testsuite/gcc.dg/torture/pr68951.c b/gcc/testsuite/gcc.dg/torture/pr68951.c new file mode 100644 index 00000000000..95c3c324279 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr68951.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-w" } */ + +static int g_534[1][1]; +int fn1() +{ + int i; + for (i = 0; i < 4; i++) + g_534[i + 2][i] ^= 3; + for (;;) + ; +} diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 4c566c84766..b039ff2bc26 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -1215,6 +1215,12 @@ vect_peeling_hash_get_lowest_cost (_vect_peel_info **slot, && GROUP_FIRST_ELEMENT (stmt_info) != stmt) continue; + /* Strided accesses perform only component accesses, alignment is + irrelevant for them. */ + if (STMT_VINFO_STRIDED_P (stmt_info) + && !STMT_VINFO_GROUPED_ACCESS (stmt_info)) + continue; + save_misalignment = DR_MISALIGNMENT (dr); vect_update_misalignment_for_peel (dr, elem->dr, elem->npeel); vect_get_data_access_cost (dr, &inside_cost, &outside_cost,