diff mbox

simplify-rtx: Fix the last fix (PR78638)

Message ID 41a58cb72eb79e6685f646b352e1d0ceb7d044bd.1480710340.git.segher@kernel.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool Dec. 2, 2016, 11:47 p.m. UTC
I managed to get the last obvious fix wrong: mode is M1, GET_MODE (op)
is M2.  Checking this in as obvious fix (to the obvious fix).  Let's
hope it ends here.  Tested on powerpc64-linux and powerpc64le-linux.


Segher


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.

---
 gcc/simplify-rtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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)))
     {