aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-05-28 10:27:48 +0200
committerRichard Biener <rguenther@suse.de>2020-05-28 11:54:50 +0200
commit09df85393ce5501a28359d159670fd05c4d70abf (patch)
treeb5125015fe545cbfcc2d80521283d8a69823abfa /gcc/tree-vect-stmts.c
parentdd019ef07358602a444f3e63f848aaece5c280f4 (diff)
downloadgcc-09df85393ce5501a28359d159670fd05c4d70abf.zip
gcc-09df85393ce5501a28359d159670fd05c4d70abf.tar.gz
gcc-09df85393ce5501a28359d159670fd05c4d70abf.tar.bz2
tree-optimization/95273 - more vectorizable_shift massaging
Covering all bases in vectorizable_shift is hard - this makes sure to appropriately handle the case of PR95356 without breaking others. 2020-05-28 Richard Biener <rguenther@suse.de> PR tree-optimization/95273 PR tree-optimization/95356 * tree-vect-stmts.c (vectorizable_shift): Adjust when and to what we set the vector type of the shift operand SLP node again. * gcc.target/i386/pr95356.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 2f92bb5..ff335aa 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -5792,7 +5792,11 @@ vectorizable_shift (vec_info *vinfo,
if (slp_node
&& (!vect_maybe_update_slp_op_vectype (slp_op0, vectype)
|| (!scalar_shift_arg
- && !vect_maybe_update_slp_op_vectype (slp_op1, vectype))))
+ && (!incompatible_op1_vectype_p
+ || dt[1] == vect_constant_def)
+ && !vect_maybe_update_slp_op_vectype
+ (slp_op1,
+ incompatible_op1_vectype_p ? vectype : op1_vectype))))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,