tree-optimization/95356 - fix vectorizable_shift vector types

Message ID nycvar.YFH.7.76.2005271409260.4397@zhemvz.fhfr.qr
State New
Headers show
Series
  • tree-optimization/95356 - fix vectorizable_shift vector types
Related show

Commit Message

Richard Biener May 27, 2020, 12:09 p.m.
This makes sure to always use the same vector type for the shift
operand as for the shifted operand.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2020-05-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/95356
	* tree-vect-stmts.c (vectorizable_shift): Adjust vector
	type for the shift operand.
---
 gcc/tree-vect-stmts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.12.3

Patch

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 225a9dc98ac..35043ecd0f9 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -5791,7 +5791,7 @@  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, op1_vectype))))
+		  && !vect_maybe_update_slp_op_vectype (slp_op1, vectype))))
 	{
 	  if (dump_enabled_p ())
 	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,