Hi, When I implemented the simplification of a truncate of a memory, I did not think about the case where we would have a truncate of a vector mode. This fixes this case. Committed as obvious after a bootstrap and test on x86_64-linux-gnu and also a build and test for arm-linux-gnueabi.
Thanks, Andrew Pinski 2012-10-02 Andrew Pinski <apin...@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.
Index: simplify-rtx.c =================================================================== --- simplify-rtx.c (revision 192004) +++ simplify-rtx.c (working copy) @@ -873,6 +873,7 @@ simplify_unary_operation_1 (enum rtx_cod /* 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);