From: Richard Biener Date: Fri, 25 Nov 2016 08:59:28 +0000 (+0000) Subject: re PR tree-optimization/78396 (gcc.dg/vect/bb-slp-cond-1.c FAILs after fix for PR77848) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bcfb22cf6bea2ad30b4d31a14c94bce374c817b;p=gcc.git re PR tree-optimization/78396 (gcc.dg/vect/bb-slp-cond-1.c FAILs after fix for PR77848) 2016-11-25 Richard Biener PR tree-optimization/78396 * tree-vectorizer.c (vectorize_loops): When the if-converted body contains masked loads or stores do not attempt to basic-block-vectorize it. From-SVN: r242865 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fefba90eab6..a0db22e199a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-11-25 Richard Biener + + PR tree-optimization/78396 + * tree-vectorizer.c (vectorize_loops): When the if-converted + body contains masked loads or stores do not attempt to + basic-block-vectorize it. + 2016-11-25 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index b3906643b8f..7538c6cac71 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -570,14 +570,23 @@ vectorize_epilogue: && ! loop->inner) { basic_block bb = loop->header; + bool has_mask_load_store = false; for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { gimple *stmt = gsi_stmt (gsi); + if (is_gimple_call (stmt) + && gimple_call_internal_p (stmt) + && (gimple_call_internal_fn (stmt) == IFN_MASK_LOAD + || gimple_call_internal_fn (stmt) == IFN_MASK_STORE)) + { + has_mask_load_store = true; + break; + } gimple_set_uid (stmt, -1); gimple_set_visited (stmt, false); } - if (vect_slp_bb (bb)) + if (! has_mask_load_store && vect_slp_bb (bb)) { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, "basic block vectorized\n");