]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
simplify-rtx.c (simplify_unary_operation_1 <case TRUNCATE>): Don't optimize a truncat...
authorAndrew Pinski <apinski@cavium.com>
Tue, 2 Oct 2012 21:03:37 +0000 (21:03 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 2 Oct 2012 21:03:37 +0000 (14:03 -0700)
2012-10-02  Andrew Pinski  <apinski@cavium.com>

* simplify-rtx.c (simplify_unary_operation_1 <case TRUNCATE>):
Don't optimize a truncate of a mem if it is a vector mode.

From-SVN: r192006

gcc/ChangeLog
gcc/simplify-rtx.c

index a8ad41cb28da40bbfa83c56b49bfce62887aa823..932f57391466fdf1d5cc1b3c742fccfbd5fa57ce 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-02  Andrew Pinski  <apinski@cavium.com>
+
+       * simplify-rtx.c (simplify_unary_operation_1 <case TRUNCATE>):
+       Don't optimize a truncate of a mem if it is a vector mode.
+
 2012-10-02  Alexandre Oliva <aoliva@redhat.com>
 
        PR debug/54551
index c3e8a0a7e1850542fda146e03ec8e837d38d8d7c..acd479876039825086ae1a18b4858c20aae04b0e 100644 (file)
@@ -873,6 +873,7 @@ simplify_unary_operation_1 (enum rtx_code code, enum machine_mode mode, rtx op)
       /* A truncate of a memory is just loading the low part of the memory
         if we are not changing the meaning of the address. */
       if (GET_CODE (op) == MEM
+         && !VECTOR_MODE_P (mode)
          && !MEM_VOLATILE_P (op)
          && !mode_dependent_address_p (XEXP (op, 0), MEM_ADDR_SPACE (op)))
        return rtl_hooks.gen_lowpart_no_emit (mode, op);