https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81245

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The fix:
Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c  (revision 249769)
+++ gcc/tree-if-conv.c  (working copy)
@@ -1853,8 +1853,8 @@
       new_stmt = gimple_build_assign (res, rhs);
       gsi_insert_before (gsi, new_stmt, GSI_SAME_STMT);
       gimple_stmt_iterator new_gsi = gsi_for_stmt (new_stmt);
+      update_stmt (new_stmt);
       fold_stmt (&new_gsi, ifcvt_follow_ssa_use_edges);
-      update_stmt (new_stmt);

       if (dump_file && (dump_flags & TDF_DETAILS))
        {

Reply via email to