This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] simplify-rtx: Add missing line for previous commit (PR78583)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Wed, 30 Nov 2016 08:38:37 +0000
- Subject: [PATCH] simplify-rtx: Add missing line for previous commit (PR78583)
- Authentication-results: sourceware.org; auth=none
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 forget to check the two modes M2 are actually the same. Tested on
powerpc64-linux, committing to trunk as obvious.
Segher
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.
---
gcc/simplify-rtx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index f922aaf..ead2f5a 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)))
{
--
1.9.3