re PR tree-optimization/68327 (ICE on valid code at -O3 on x86_64-linux-gnu in vect_is_simple_use, at tree-vect-stmts.c:8562)
gcc/ PR tree-optimization/68327 * tree-vect-loop.c (vect_determine_vectorization_factor): Don't compute vectype for non-relevant mask producers. * gcc/tree-vect-stmts.c (vectorizable_comparison): Check stmt relevance earlier. gcc/testsuite/ PR tree-optimization/68327 * gcc.dg/pr68327.c: New test. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r230743
This commit is contained in:
parent
1cabb20439
commit
c245362b97
|
@ -1,3 +1,12 @@
|
|||
2015-11-23 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/68327
|
||||
* tree-vect-loop.c (vect_determine_vectorization_factor): Don't
|
||||
compute vectype for non-relevant mask producers.
|
||||
* gcc/tree-vect-stmts.c (vectorizable_comparison): Check stmt
|
||||
relevance earlier.
|
||||
|
||||
2015-11-23 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/68460
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-11-23 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
|
||||
PR tree-optimization/68327
|
||||
* gcc.dg/pr68327.c: New test.
|
||||
|
||||
2015-11-23 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR tree-optimization/68460
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3" } */
|
||||
|
||||
int a, d;
|
||||
char b, c;
|
||||
|
||||
void
|
||||
fn1 ()
|
||||
{
|
||||
int i = 0;
|
||||
for (; i < 1; i++)
|
||||
d = 1;
|
||||
for (; b; b++)
|
||||
a = 1 && (d & b);
|
||||
}
|
|
@ -439,7 +439,8 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
|
|||
compute a factor. */
|
||||
if (TREE_CODE (scalar_type) == BOOLEAN_TYPE)
|
||||
{
|
||||
mask_producers.safe_push (stmt_info);
|
||||
if (STMT_VINFO_RELEVANT_P (stmt_info))
|
||||
mask_producers.safe_push (stmt_info);
|
||||
bool_result = true;
|
||||
|
||||
if (gimple_code (stmt) == GIMPLE_ASSIGN
|
||||
|
|
|
@ -7590,6 +7590,9 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
|
|||
tree mask_type;
|
||||
tree mask;
|
||||
|
||||
if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
|
||||
return false;
|
||||
|
||||
if (!VECTOR_BOOLEAN_TYPE_P (vectype))
|
||||
return false;
|
||||
|
||||
|
@ -7602,9 +7605,6 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
|
|||
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
|
||||
|
||||
gcc_assert (ncopies >= 1);
|
||||
if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
|
||||
return false;
|
||||
|
||||
if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
|
||||
&& !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
|
||||
&& reduc_def))
|
||||
|
|
Loading…
Reference in New Issue