+2016-07-07 Martin Liska <mliska@suse.cz>
+
+ * trans-stmt.c (gfc_trans_do): Add expect builtin for DO
+ loops with step bigger than +-1.
+
2016-07-05 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
* array.c (gfc_match_array_ref): Add parsing support for
pos = build2 (COMPOUND_EXPR, void_type_node,
fold_build2 (MODIFY_EXPR, void_type_node,
countm1, tmp2),
- build3_loc (loc, COND_EXPR, void_type_node, tmp,
+ build3_loc (loc, COND_EXPR, void_type_node,
+ gfc_unlikely (tmp, PRED_FORTRAN_LOOP_PREHEADER),
build1_loc (loc, GOTO_EXPR, void_type_node,
exit_label), NULL_TREE));
neg = build2 (COMPOUND_EXPR, void_type_node,
fold_build2 (MODIFY_EXPR, void_type_node,
countm1, tmp2),
- build3_loc (loc, COND_EXPR, void_type_node, tmp,
+ build3_loc (loc, COND_EXPR, void_type_node,
+ gfc_unlikely (tmp, PRED_FORTRAN_LOOP_PREHEADER),
build1_loc (loc, GOTO_EXPR, void_type_node,
exit_label), NULL_TREE));
+2016-07-07 Martin Liska <mliska@suse.cz>
+
+ * gfortran.dg/predict-1.f90: Ammend the test.
+ * gfortran.dg/predict-2.f90: Likewise.
+
2016-07-07 Ilya Enkovich <ilya.enkovich@intel.com>
PR ipa/71624
subroutine test(block, array)
integer :: i, block(9), array(2)
-do i = array(1), array(2)
+do i = array(1), array(2), 2
block(i) = i
end do
+
+do i = array(1), array(2), -2
+ block(i) = block(i) + i
+end do
+
end subroutine test
-! { dg-final { scan-tree-dump-times "Fortran loop preheader heuristics of edge\[^:\]*: 99.0%" 1 "profile_estimate" } }
+! { dg-final { scan-tree-dump-times "Fortran loop preheader heuristics of edge\[^:\]*: 1.0%" 2 "profile_estimate" } }
subroutine test(block, array)
integer :: i,j, block(9), array(2)
-do i = array(1), array(2)
- do j = array(1), array(2)
+do i = array(1), array(2), 2
+ do j = array(1), array(2), 3
block(i) = j
end do
end do
end subroutine test
! { dg-final { scan-tree-dump-times "Fortran loop preheader heuristics of edge" 2 "profile_estimate" } }
-! { dg-final { scan-tree-dump-times "loop gueard" 0 "profile_estimate" } }
+! { dg-final { scan-tree-dump-times "loop guard" 0 "profile_estimate" } }