tree-optimization/95356 - fix vectorizable_shift vector types
authorRichard Biener <rguenther@suse.de>
Wed, 27 May 2020 09:42:35 +0000 (11:42 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 27 May 2020 12:14:11 +0000 (14:14 +0200)
This makes sure to always use the same vector type for the shift
operand as for the shifted operand.

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

index 225a9dc98ac583a5e8a82b6c4678d1fb84eaaa13..35043ecd0f912786b56e413abd9e70b0b4f8c179 100644 (file)
@@ -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,