]> gcc.gnu.org Git - gcc.git/commitdiff
re PR rtl-optimization/56957 (ICE in add_insn_after, at emit-rtl.c:3783)
authorAndrey Belevantsev <abel@ispras.ru>
Tue, 30 Apr 2013 10:55:52 +0000 (14:55 +0400)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Tue, 30 Apr 2013 10:55:52 +0000 (14:55 +0400)
        PR rtl-optimization/56957
        PR rtl-optimization/57105

        * sel-sched.c (move_op_orig_expr_found): Remove insn_emitted
        variable.  Use just INSN_UID for determining whether an insn
        should be only disconnected from the insn stream.
        * sel-sched-ir.h (EXPR_WAS_CHANGED): Remove.

* gcc.dg/pr57105.c: New test.

From-SVN: r198449

gcc/ChangeLog
gcc/sel-sched-ir.h
gcc/sel-sched.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr57105.c [new file with mode: 0644]

index 236a905f7f34a0e7b5d7215e27a509f3bf845020..cde1dec35785adca80d0fadaa9abda79dcb32816 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-30  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/56957
+       PR rtl-optimization/57105
+
+       * sel-sched.c (move_op_orig_expr_found): Remove insn_emitted
+       variable.  Use just INSN_UID for determining whether an insn
+       should be only disconnected from the insn stream.
+       * sel-sched-ir.h (EXPR_WAS_CHANGED): Remove.
+
 2013-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/57104
index 6d9394a4428530304203cc5f167b51895bafc9a9..486159dd262f98213829afb479af699d6867e0e4 100644 (file)
@@ -191,8 +191,6 @@ typedef expr_def *expr_t;
 #define EXPR_WAS_RENAMED(EXPR) ((EXPR)->was_renamed)
 #define EXPR_CANT_MOVE(EXPR) ((EXPR)->cant_move)
 
-#define EXPR_WAS_CHANGED(EXPR) (EXPR_HISTORY_OF_CHANGES (EXPR).length () > 0)
-
 /* Insn definition for list of original insns in find_used_regs.  */
 struct _def
 {
index 11bf2e62c31d9c9ef8414d707028cd0f4e825189..fb9386f969000cfbe7fd10919c34d39d6b44a492 100644 (file)
@@ -6051,14 +6051,13 @@ move_op_orig_expr_found (insn_t insn, expr_t expr,
                          cmpd_local_params_p lparams ATTRIBUTE_UNUSED,
                          void *static_params)
 {
-  bool only_disconnect, insn_emitted;
+  bool only_disconnect;
   moveop_static_params_p params = (moveop_static_params_p) static_params;
 
   copy_expr_onside (params->c_expr, INSN_EXPR (insn));
   track_scheduled_insns_and_blocks (insn);
-  insn_emitted = handle_emitting_transformations (insn, expr, params);
-  only_disconnect = (params->uid == INSN_UID (insn)
-                     && ! insn_emitted  && ! EXPR_WAS_CHANGED (expr));
+  handle_emitting_transformations (insn, expr, params);
+  only_disconnect = params->uid == INSN_UID (insn);
 
   /* Mark that we've disconnected an insn.  */
   if (only_disconnect)
index 77183feb8f241d32f8f7064cd1c28fc80d69ac97..00576eec6a32bc43348fbcfab814ef591e17e35d 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-30  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/57105
+       * gcc.dg/pr57105.c: New test.
+
 2013-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/57104
diff --git a/gcc/testsuite/gcc.dg/pr57105.c b/gcc/testsuite/gcc.dg/pr57105.c
new file mode 100644 (file)
index 0000000..a968f52
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-Os -fselective-scheduling2 -g" } */
+int bar (int);
+int *baz (int *);
+
+void
+foo (int a)
+{
+  while (bar (0))
+    {
+      int *c = baz (0);
+      if (a)
+       {
+         int i = *baz (c);
+       }
+      bar (*baz (c));
+    }
+}
This page took 0.093734 seconds and 5 git commands to generate.