OSDN Git Service

* gcc.dg/20040910-1.c, gcc.dg/cpp/digraph2.c,
[pf3gnuchains/gcc-fork.git] / gcc / simplify-rtx.c
index 7236bbf..e463fef 100644 (file)
@@ -50,7 +50,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  ((((HOST_WIDE_INT) low) < 0) ? ((HOST_WIDE_INT) -1) : ((HOST_WIDE_INT) 0))
 
 static rtx neg_const_int (enum machine_mode, rtx);
-static bool mode_signbit_p (enum machine_mode, rtx);
 static int simplify_plus_minus_op_data_cmp (const void *, const void *);
 static rtx simplify_plus_minus (enum rtx_code, enum machine_mode, rtx,
                                rtx, int);
@@ -72,7 +71,7 @@ neg_const_int (enum machine_mode mode, rtx i)
 /* Test whether expression, X, is an immediate constant that represents
    the most significant bit of machine mode MODE.  */
 
-static bool
+bool
 mode_signbit_p (enum machine_mode mode, rtx x)
 {
   unsigned HOST_WIDE_INT val;
@@ -3790,7 +3789,8 @@ simplify_gen_subreg (enum machine_mode outermode, rtx op,
   if (newx)
     return newx;
 
-  if (GET_CODE (op) == SUBREG || GET_MODE (op) == VOIDmode)
+  if (GET_CODE (op) == SUBREG || GET_MODE (op) == VOIDmode
+      || (REG_P (op) && REGNO (op) < FIRST_PSEUDO_REGISTER))
     return NULL_RTX;
 
   return gen_rtx_SUBREG (outermode, op, byte);