diff options
author | Richard Biener <rguenther@suse.de> | 2022-01-28 11:32:11 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-01-28 13:29:56 +0100 |
commit | 9ec306582fd60e5b76f07eb81c9ed2415d9a3590 (patch) | |
tree | e804f4ad0bea03e28703899a983e763fe5b64597 /gcc | |
parent | 5b6f04276e3d1f20817ed37b2e26e43bd12cc0d2 (diff) | |
download | gcc-9ec306582fd60e5b76f07eb81c9ed2415d9a3590.zip gcc-9ec306582fd60e5b76f07eb81c9ed2415d9a3590.tar.gz gcc-9ec306582fd60e5b76f07eb81c9ed2415d9a3590.tar.bz2 |
tree-optimization/104267 - fix external def vector type for call args
The following fixes the vector type registered for external defs
in call arguments when vectorizing with SLP. We assumed uniform
vectype_in types here but with calls like .COND_MUL we also have
mask arguments which, when invariant or external, need to have
a proper mask vector type.
2022-01-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/104267
* tree-vect-stmts.cc (vectorizable_call): Properly use the
per-argument determined vector type for externals and
invariants.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vect-stmts.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 824ebb6..000a0f4 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -3444,7 +3444,9 @@ vectorizable_call (vec_info *vinfo, { if (slp_node) for (i = 0; i < nargs; ++i) - if (!vect_maybe_update_slp_op_vectype (slp_op[i], vectype_in)) + if (!vect_maybe_update_slp_op_vectype (slp_op[i], + vectypes[i] + ? vectypes[i] : vectype_in)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, |