OSDN Git Service

* tree-vect-patterns.c (vect_single_imm_use): Correct return
[pf3gnuchains/gcc-fork.git] / gcc / rtlhooks.c
index 25fbc09..60e4d52 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic hooks for the RTL middle-end.
-   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -61,8 +61,7 @@ gen_lowpart_general (enum machine_mode mode, rtx x)
       /* The following exposes the use of "x" to CSE.  */
       if (GET_MODE_SIZE (GET_MODE (x)) <= UNITS_PER_WORD
          && SCALAR_INT_MODE_P (GET_MODE (x))
-         && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
-                                   GET_MODE_BITSIZE (GET_MODE (x)))
+         && TRULY_NOOP_TRUNCATION_MODES_P (mode, GET_MODE (x))
          && !reload_completed)
        return gen_lowpart_general (mode, force_reg (GET_MODE (x), x));
 
@@ -153,7 +152,8 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
                   - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
 
       new_rtx = adjust_address_nv (x, mode, offset);
-      if (! memory_address_p (mode, XEXP (new_rtx, 0)))
+      if (! memory_address_addr_space_p (mode, XEXP (new_rtx, 0),
+                                        MEM_ADDR_SPACE (x)))
        return 0;
 
       return new_rtx;