OSDN Git Service

PR rtl-optimization/44691
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2010 10:03:39 +0000 (10:03 +0000)
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Aug 2010 10:03:39 +0000 (10:03 +0000)
* sel-sched.c (count_occurrences_1): Also punt when SUBREG_REG
is not a register.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163369 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/sel-sched.c

index ff0e2c0..1b92353 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 3a86e22..534c55c 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