new file mode 100644
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-additional-options "-O3" }
+
+SUBROUTINE MY_ROUTINE (N, A, B )
+IMPLICIT NONE
+INTEGER, INTENT(IN) :: N
+COMPLEX, INTENT(IN) :: A(N)
+COMPLEX, INTENT(OUT) :: B(N)
+INTEGER :: II
+B(:) = (1.,0.)
+DO II = 1, N-1
+ B(II) = A(N-II+1) / A(N-II)
+ENDDO
+END SUBROUTINE MY_ROUTINE
@@ -4328,7 +4328,8 @@ vect_optimize_slp_pass::is_cfg_latch_edge (graph_edge *ud)
{
slp_tree use = m_vertices[ud->src].node;
slp_tree def = m_vertices[ud->dest].node;
- if (SLP_TREE_DEF_TYPE (use) != vect_internal_def
+ if ((SLP_TREE_DEF_TYPE (use) != vect_internal_def
+ || SLP_TREE_CODE (use) == VEC_PERM_EXPR)
|| SLP_TREE_DEF_TYPE (def) != vect_internal_def)
return false;