summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 21:03:37 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 21:03:37 +0000
commitea70b59793087198d6ae137fa5e68096ec1c30a3 (patch)
treeb9f0d6e93903ee4d20168c9841c8cb91e8491689
parente2b2e56e706444249ee0b20d14d54aed8d38c8f1 (diff)
downloadgcc-ea70b59793087198d6ae137fa5e68096ec1c30a3.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192006 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a8ad41cb28d..932f5739146 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index c3e8a0a7e18..acd47987603 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -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);