]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/69885 (ICE in maybe_legitimize_operand, at optabs.c:6903 on m68k...
authorJakub Jelinek <jakub@redhat.com>
Mon, 22 Feb 2016 14:22:07 +0000 (15:22 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 22 Feb 2016 14:22:07 +0000 (15:22 +0100)
PR target/69885
* config/m68k/m68k.md (ashldi3, ashrdi3, lshrdi3): Use
SImode for last match_operand.

* gcc.dg/pr69885.c: New test.

From-SVN: r233603

gcc/ChangeLog
gcc/config/m68k/m68k.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr69885.c [new file with mode: 0644]

index 32304003630639d086b6becb4e64054570eed1a8..6d1a557579d7854d6248f0d56d1e9aa1ce8b89fa 100644 (file)
@@ -1,3 +1,9 @@
+2016-02-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69885
+       * config/m68k/m68k.md (ashldi3, ashrdi3, lshrdi3): Use
+       SImode for last match_operand.
+
 2016-02-22  Martin Liska  <mliska@suse.cz>
 
        * hsa-gen.c (gen_hsa_clrsb): In case of zero value,
index 5731780631f68d4a8f5fa0c905b0b466234e2b4b..ec37bd76f55fc5ea7b0163de9f205b9f72ea44a8 100644 (file)
 (define_expand "ashldi3"
   [(set (match_operand:DI 0 "register_operand" "")
        (ashift:DI (match_operand:DI 1 "register_operand" "")
-                  (match_operand 2 "const_int_operand" "")))]
+                  (match_operand:SI 2 "const_int_operand" "")))]
   "!TARGET_COLDFIRE"
 {
   /* ???  This is a named pattern like this is not allowed to FAIL based
 (define_expand "ashrdi3"
   [(set (match_operand:DI 0 "register_operand" "")
        (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
-                    (match_operand 2 "const_int_operand" "")))]
+                    (match_operand:SI 2 "const_int_operand" "")))]
   "!TARGET_COLDFIRE"
 {
   /* ???  This is a named pattern like this is not allowed to FAIL based
 (define_expand "lshrdi3"
   [(set (match_operand:DI 0 "register_operand" "")
        (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
-                    (match_operand 2 "const_int_operand" "")))]
+                    (match_operand:SI 2 "const_int_operand" "")))]
   "!TARGET_COLDFIRE"
 {
   /* ???  This is a named pattern like this is not allowed to FAIL based
index 927af63cde2303b99352332f0700cd0bb5560bfc..0b82dae0a03d62fb06d63b4d70c256008ee68502 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/69885
+       * gcc.dg/pr69885.c: New test.
+
 2016-02-22  Oleg Endo  <olegendo@gcc.gnu.org>
 
        PR target/69806
diff --git a/gcc/testsuite/gcc.dg/pr69885.c b/gcc/testsuite/gcc.dg/pr69885.c
new file mode 100644 (file)
index 0000000..e3a218b
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR target/69885 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-m68000" { target m68k*-*-* } } */
+
+void bar (void);
+
+void
+foo (long long x)
+{
+  if (x >> 1)
+    bar ();
+}