]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/44691 (ICE: RTL check: expected code 'reg', have 'plus' in...
authorAndrey Belevantsev <abel@ispras.ru>
Thu, 19 Aug 2010 10:03:39 +0000 (14:03 +0400)
committerAndrey Belevantsev <abel@gcc.gnu.org>
Thu, 19 Aug 2010 10:03:39 +0000 (14:03 +0400)
PR rtl-optimization/44691
* sel-sched.c (count_occurrences_1): Also punt when SUBREG_REG
is not a register.

From-SVN: r163369

gcc/ChangeLog
gcc/sel-sched.c

index ff0e2c0bdf3027a4b8493ff2481ec9d943fda1b1..1b92353c49df61af6db211c5462582ac330b8b76 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-19  Andrey Belevantsev  <abel@ispras.ru>
+
+       PR rtl-optimization/44691
+       * sel-sched.c (count_occurrences_1): Also punt when SUBREG_REG
+       is not a register. 
+
 2010-08-19  Ian Bolton  <ian.bolton@arm.com>
 
        PR target/45070
index 3a86e22feef43d6cba796a04651cef69a72eb31d..534c55ca4704b70b3007a6b0654fa2dab845d653 100644 (file)
@@ -835,7 +835,8 @@ count_occurrences_1 (rtx *cur_rtx, void *arg)
 
   if (GET_CODE (*cur_rtx) == SUBREG
       && REG_P (p->x)
-      && REGNO (SUBREG_REG (*cur_rtx)) == REGNO (p->x))
+      && (!REG_P (SUBREG_REG (*cur_rtx))
+         || REGNO (SUBREG_REG (*cur_rtx)) == REGNO (p->x)))
     {
       /* ??? Do not support substituting regs inside subregs.  In that case,
          simplify_subreg will be called by validate_replace_rtx, and