re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / valtrack.c
index 3dfb8a97aeaa1c3d0051abd56cdb6758aa7556dc..80a0043196935469449731f367bafe5201420b8a 100644 (file)
@@ -27,12 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "predict.h"
 #include "basic-block.h"
 #include "valtrack.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "vec.h"
-#include "machmode.h"
 #include "hard-reg-set.h"
-#include "input.h"
 #include "function.h"
 #include "regs.h"
 #include "emit-rtl.h"
@@ -671,9 +666,7 @@ dead_debug_insert_temp (struct dead_debug_local *debug, unsigned int uregno,
             the debug temp to.  ??? We could bind the debug_expr to a
             CONCAT or PARALLEL with the split multi-registers, and
             replace them as we found the corresponding sets.  */
-         else if (REGNO (reg) < FIRST_PSEUDO_REGISTER
-                  && (hard_regno_nregs[REGNO (reg)][GET_MODE (reg)]
-                      != hard_regno_nregs[REGNO (reg)][GET_MODE (dest)]))
+         else if (REG_NREGS (reg) != REG_NREGS (dest))
            breg = NULL;
          /* Ok, it's the same (hardware) REG, but with a different
             mode, so SUBREG it.  */
@@ -695,7 +688,7 @@ dead_debug_insert_temp (struct dead_debug_local *debug, unsigned int uregno,
             setting REG in its mode would, we won't know what to bind
             the debug temp to.  */
          else if (REGNO (reg) < FIRST_PSEUDO_REGISTER
-                  && (hard_regno_nregs[REGNO (reg)][GET_MODE (reg)]
+                  && (REG_NREGS (reg)
                       != hard_regno_nregs[REGNO (reg)][GET_MODE (dest)]))
            breg = NULL;
          /* Yay, we can use SRC, just adjust its mode.  */