--- /dev/null
+! { dg-do compile }
+! { dg-options "-O1 -ftree-slp-vectorize -fwrapv" }
+! { dg-additional-options "-march=armv8-a+sve" { target aarch64-*-* } }
+
+subroutine sprpl5 (left)
+ implicit none
+
+ integer :: left
+ integer :: avail1, avail2, delx1, delx2, i2, ic
+
+ ic = left
+ delx1 = ic / 2
+ delx2 = delx1 + 1
+ i2 = ic + delx2
+ avail1 = i2
+ avail2 = 1
+
+ do delx1 = 1, 2
+ ic = left + nint (real (left) / 2)
+ if (ic .ge. avail1) avail1 = ic + 1
+
+ i2 = ic + delx2
+ if (i2 .le. avail2) avail2 = i2 + 1
+ end do
+end subroutine sprpl5
continue;
}
- if (need_same_oprnds)
+ if (!load_p && rhs_code == CALL_EXPR)
{
- tree other_op1 = (call_stmt
- ? gimple_call_arg (call_stmt, 1)
- : gimple_assign_rhs2 (stmt));
- if (!operand_equal_p (first_op1, other_op1, 0))
+ if (!compatible_calls_p (as_a <gcall *> (stmts[0]->stmt),
+ as_a <gcall *> (stmt)))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Build SLP failed: different shift "
- "arguments in %G", stmt);
+ "Build SLP failed: different calls in %G",
+ stmt);
/* Mismatch. */
continue;
}
}
- if (!load_p && rhs_code == CALL_EXPR)
+ if (need_same_oprnds)
{
- if (!compatible_calls_p (as_a <gcall *> (stmts[0]->stmt),
- as_a <gcall *> (stmt)))
+ tree other_op1 = (call_stmt
+ ? gimple_call_arg (call_stmt, 1)
+ : gimple_assign_rhs2 (stmt));
+ if (!operand_equal_p (first_op1, other_op1, 0))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Build SLP failed: different calls in %G",
- stmt);
+ "Build SLP failed: different shift "
+ "arguments in %G", stmt);
/* Mismatch. */
continue;
}