aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2016-12-03 00:51:31 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2016-12-03 00:51:31 +0100
commit5bd12bafb5bebafa1a96f0f41c598b57c334576f (patch)
tree81214b5c74677943be5367ef8263ce467f68cd30 /gcc
parentbf7f70ffb57c900d18fed28ad05fc2876d435b3d (diff)
downloadgcc-5bd12bafb5bebafa1a96f0f41c598b57c334576f.zip
gcc-5bd12bafb5bebafa1a96f0f41c598b57c334576f.tar.gz
gcc-5bd12bafb5bebafa1a96f0f41c598b57c334576f.tar.bz2
simplify-rtx: Fix the last fix (PR78638)
I managed to get the last obvious fix wrong: mode is M1, GET_MODE (op) is M2. * simplify-rtx.c (simplify_truncation): M2 is not mode, it is GET_MODE (op). Fix this. From-SVN: r243210
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 18efa04..0d57fe3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-02 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * simplify-rtx.c (simplify_truncation): M2 is not mode, it is
+ GET_MODE (op). Fix this.
+
2016-12-02 David Malcolm <dmalcolm@redhat.com>
PR bootstrap/78616
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 7ed849f..165af23 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -752,7 +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
+ && GET_MODE (XEXP (op, 0)) == GET_MODE (op)
&& CONST_INT_P (XEXP (op, 1))
&& CONST_INT_P (XEXP (op, 2)))
{