]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/68400 (ICE in change_address_1, at emit-rtl.c:2125)
authorSteve Ellcey <sellcey@imgtec.com>
Thu, 28 Jan 2016 22:25:55 +0000 (22:25 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 28 Jan 2016 22:25:55 +0000 (22:25 +0000)
2016-01-28  Steve Ellcey  <sellcey@imgtec.com>

PR target/68400
* config/mips/mips.c (and_operands_ok): Add MIPS16 check.

From-SVN: r232952

gcc/ChangeLog
gcc/config/mips/mips.c

index 4df81d56a199f38e22e25db0e9f99c43f412fa2f..209bb0d0c209a0d045d29fca3dc8796bda8bf639 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-28  Steve Ellcey  <sellcey@imgtec.com>
+
+       PR target/68400
+       * config/mips/mips.c (and_operands_ok): Add MIPS16 check.
+
 2016-01-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/69542
index 890e947c0942083da7beb82a9608cdb497e136ff..84fbc9776df91787b3791f81191bb7af39ee0c54 100644 (file)
@@ -8006,9 +8006,18 @@ mask_low_and_shift_p (machine_mode mode, rtx mask, rtx shift, int maxlen)
 bool
 and_operands_ok (machine_mode mode, rtx op1, rtx op2)
 {
-  return (memory_operand (op1, mode)
-         ? and_load_operand (op2, mode)
-         : and_reg_operand (op2, mode));
+
+  if (memory_operand (op1, mode))
+    {
+      if (TARGET_MIPS16) {
+       struct mips_address_info addr;
+       if (!mips_classify_address (&addr, op1, mode, false))
+         return false;
+      }
+      return and_load_operand (op2, mode);
+    }
+  else
+    return and_reg_operand (op2, mode);
 }
 
 /* The canonical form of a mask-low-and-shift-left operation is