]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
simplify-rtx: Fix the last fix (PR78638)
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 2 Dec 2016 23:51:31 +0000 (00:51 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 2 Dec 2016 23:51:31 +0000 (00:51 +0100)
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

gcc/ChangeLog
gcc/simplify-rtx.c

index 18efa0405afee5a7594befd2247189e85a130250..0d57fe3117032275a01dc107d2502aaa4cb1b0c3 100644 (file)
@@ -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
index 7ed849f92bb2188ca627a79fbae362ba36ed7cce..165af2306f4b2e414472c629a5da2edb6aac096e 100644 (file)
@@ -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)))
     {