new file mode 100644
@@ -0,0 +1,22 @@
+// { dg-do compile }
+// { dg-additional-options "-O3 -fvect-cost-model=dynamic" }
+
+extern bool var_10;
+extern int var_16;
+extern short var_17;
+extern long var_18;
+extern int arr_3[][13];
+
+int min(const int &a, const int &b)
+{
+ return a < b ? a : b;
+}
+
+void test() {
+ for (short a = 0; a < 010; a++)
+ for (char b = 0; b < 012; b++)
+ arr_3[a][b] = min(-var_10, 0) + 2147483647 >> var_10;
+ var_16 = (bool)4;
+ var_17 = 0;
+ var_18 = -1594153176;
+}
@@ -5784,7 +5784,8 @@ vectorizable_shift (vec_info *vinfo,
{
if (slp_node
&& (!vect_maybe_update_slp_op_vectype (slp_op0, vectype)
- || !vect_maybe_update_slp_op_vectype (slp_op1, op1_vectype)))
+ || (!scalar_shift_arg
+ && !vect_maybe_update_slp_op_vectype (slp_op1, op1_vectype))))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,