From: Adam Nemet Date: Tue, 3 Jan 2006 05:05:06 +0000 (+0000) Subject: combine.c (apply_distributive_law ): Check TRULY_NOOP_TRUNCATION. X-Git-Tag: releases/gcc-4.2.0~5075 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13f406e12f237894d8b44632651959863b99dff;p=thirdparty%2Fgcc.git combine.c (apply_distributive_law ): Check TRULY_NOOP_TRUNCATION. * combine.c (apply_distributive_law ): Check TRULY_NOOP_TRUNCATION. From-SVN: r109261 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cac247956039..1be3f95da3ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-01-02 Adam Nemet + + * combine.c (apply_distributive_law ): Check + TRULY_NOOP_TRUNCATION. + 2006-01-02 Geoffrey Keating * dwarf2out.c (have_switched_text_section): Delete. diff --git a/gcc/combine.c b/gcc/combine.c index 1361b10d27c0..e9bd66767924 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)),