diff options
author | Richard Biener <rguenther@suse.de> | 2020-09-23 10:42:48 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-09-23 12:19:22 +0200 |
commit | 52e5b3fd8ef1d1b3ff86e26bd0aa7266bd9767fd (patch) | |
tree | f54d9b23e89404d014c35bb3d9793786e2cab0c5 /gcc/tree-vect-loop.c | |
parent | e8e818399d70c5a5a3d30a54d305c6e2b92e2c66 (diff) | |
download | gcc-52e5b3fd8ef1d1b3ff86e26bd0aa7266bd9767fd.zip gcc-52e5b3fd8ef1d1b3ff86e26bd0aa7266bd9767fd.tar.gz gcc-52e5b3fd8ef1d1b3ff86e26bd0aa7266bd9767fd.tar.bz2 |
tree-optimization/97173 - extend assert in vectorizable_live_operation
The condition we're expecting to eventually run into isn't fully
captured by checking for CTORs, instead we can also run into the
CTOR element conversion.
2020-09-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/97173
* tree-vect-loop.c (vectorizable_live_operation): Extend
assert to also conver element conversions.
* gcc.dg/vect/pr97173.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index b1a6e15..46d126c 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8345,8 +8345,10 @@ vectorizable_live_operation (vec_info *vinfo, if (gimple_code (use_stmt) != GIMPLE_PHI && !vect_stmt_dominates_stmt_p (gsi_stmt (*gsi), use_stmt)) { - gcc_assert (is_gimple_assign (use_stmt) - && gimple_assign_rhs_code (use_stmt) == CONSTRUCTOR); + enum tree_code code = gimple_assign_rhs_code (use_stmt); + gcc_assert (code == CONSTRUCTOR + || code == VIEW_CONVERT_EXPR + || CONVERT_EXPR_CODE_P (code)); if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "Using original scalar computation for " |