diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2013-03-21 16:22:09 +0100 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2013-03-21 15:22:09 +0000 |
commit | d08633b496a5820431e4049ee8a564796a42114d (patch) | |
tree | c0a4b293cf6c5ae085f77b6d0f9d51874536ca20 /gcc | |
parent | bc5faa5b5c1965d4c1c43e41f50a3011e8e18472 (diff) | |
download | gcc-d08633b496a5820431e4049ee8a564796a42114d.zip gcc-d08633b496a5820431e4049ee8a564796a42114d.tar.gz gcc-d08633b496a5820431e4049ee8a564796a42114d.tar.bz2 |
simplify-rtx.c (simplify_binary_operation_1): Restrict the transformation to equal modes.
2013-03-21 Marc Glisse <marc.glisse@inria.fr>
* simplify-rtx.c (simplify_binary_operation_1) <VEC_CONCAT>:
Restrict the transformation to equal modes.
From-SVN: r196882
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33cbd38..0baa0a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-03-21 Marc Glisse <marc.glisse@inria.fr> + + * simplify-rtx.c (simplify_binary_operation_1) <VEC_CONCAT>: + Restrict the transformation to equal modes. + 2013-03-21 Richard Biener <rguenther@suse.de> PR tree-optimization/39326 diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 43700cf..c320bcf 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); |