diff options
author | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-21 15:22:09 +0000 |
---|---|---|
committer | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-21 15:22:09 +0000 |
commit | d09e949c2d9121aa1bfb66a1868bf85a9822b135 (patch) | |
tree | c0a4b293cf6c5ae085f77b6d0f9d51874536ca20 /gcc/simplify-rtx.c | |
parent | a1bd99a893084fb76a17794db7a0776fd0e7db5e (diff) | |
download | gcc-d09e949c2d9121aa1bfb66a1868bf85a9822b135.tar.gz |
2013-03-21 Marc Glisse <marc.glisse@inria.fr>
* simplify-rtx.c (simplify_binary_operation_1) <VEC_CONCAT>:
Restrict the transformation to equal modes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196882 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 43700cff151..c320bcf5807 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3623,10 +3623,13 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, return gen_rtx_CONST_VECTOR (mode, v); } - /* Try to merge VEC_SELECTs from the same vector into a single one. */ + /* Try to merge two VEC_SELECTs from the same vector into a single one. + Restrict the transformation to avoid generating a VEC_SELECT with a + mode unrelated to its operand. */ if (GET_CODE (trueop0) == VEC_SELECT && GET_CODE (trueop1) == VEC_SELECT - && rtx_equal_p (XEXP (trueop0, 0), XEXP (trueop1, 0))) + && rtx_equal_p (XEXP (trueop0, 0), XEXP (trueop1, 0)) + && GET_MODE (XEXP (trueop0, 0)) == mode) { rtx par0 = XEXP (trueop0, 1); rtx par1 = XEXP (trueop1, 1); |