diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2006-01-03 05:05:06 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2006-01-03 05:05:06 +0000 |
commit | f13f406e12f237894d8b44632651959863b99dff (patch) | |
tree | 1b9624afc1f2b260e99b731fadcf5c018503ec90 /gcc/combine.c | |
parent | 1146e682161b865edd7d440bfe2c7d4f42308dbe (diff) | |
download | gcc-f13f406e12f237894d8b44632651959863b99dff.zip gcc-f13f406e12f237894d8b44632651959863b99dff.tar.gz gcc-f13f406e12f237894d8b44632651959863b99dff.tar.bz2 |
combine.c (apply_distributive_law <SUBREG>): Check TRULY_NOOP_TRUNCATION.
* combine.c (apply_distributive_law <SUBREG>): Check
TRULY_NOOP_TRUNCATION.
From-SVN: r109261
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 1361b10..e9bd667 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7798,7 +7798,12 @@ apply_distributive_law (rtx x) || (GET_MODE_SIZE (GET_MODE (lhs)) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))) || VECTOR_MODE_P (GET_MODE (lhs)) - || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD) + || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD + /* Result might need to be truncated. Don't change mode if + explicit truncation is needed. */ + || !TRULY_NOOP_TRUNCATION + (GET_MODE_BITSIZE (GET_MODE (x)), + GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (lhs))))) return x; tem = simplify_gen_binary (code, GET_MODE (SUBREG_REG (lhs)), |