aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2016-11-30 09:41:26 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2016-11-30 09:41:26 +0100
commit2df22b5f30b902dea76f131f78e08e530e7bf613 (patch)
tree40dbe8d64eeb08dc20355fa838e021d7259f495e
parent4a954e068579e326c53bd845a13fbd58ae5a1f80 (diff)
downloadgcc-2df22b5f30b902dea76f131f78e08e530e7bf613.zip
gcc-2df22b5f30b902dea76f131f78e08e530e7bf613.tar.gz
gcc-2df22b5f30b902dea76f131f78e08e530e7bf613.tar.bz2
simplify-rtx: Add missing line for previous commit (PR78583)
The comment for the added case to simplify_truncation reads /* Turn (truncate:M1 (*_extract:M2 (reg:M2) (len) (pos))) into (*_extract:M1 (truncate:M1 (reg:M2)) (len) (pos')) if possible without changing len. */ but I forgot to check the two modes M2 are actually the same. PR rtl-optimization/78583 * simplify-rtx.c (simplify_truncation): Add check missing from the previous commit. From-SVN: r243000
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1febcad..8f8e450 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2016-11-30 Segher Boessenkool <segher@kernel.crashing.org>
+ PR rtl-optimization/78583
+ * simplify-rtx.c (simplify_truncation): Add check missing from the
+ previous commit.
+
+2016-11-30 Segher Boessenkool <segher@kernel.crashing.org>
+
PR rtl-optimization/78590
* combine.c (change_zero_ext): Transform zero_extend of subregs only
if the subreg_reg is a scalar integer mode.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 7778db5..7ed849f 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -752,6 +752,7 @@ simplify_truncation (machine_mode mode, rtx op,
changing len. */
if ((GET_CODE (op) == ZERO_EXTRACT || GET_CODE (op) == SIGN_EXTRACT)
&& REG_P (XEXP (op, 0))
+ && GET_MODE (XEXP (op, 0)) == mode
&& CONST_INT_P (XEXP (op, 1))
&& CONST_INT_P (XEXP (op, 2)))
{