re PR target/81995 (gcc/reg-stack.c:2073:1: error: unrecognizable insn:)
authorUros Bizjak <ubizjak@gmail.com>
Sun, 27 Aug 2017 18:01:46 +0000 (20:01 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 27 Aug 2017 18:01:46 +0000 (20:01 +0200)
PR target/81995
* config/i386/i386.md (*<btsc><mode>): Change operand 2
predicate to register_operand.  Reorder operands.
(*btr<mode>): Ditto.
(*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
(*btr<mode>_mask): Ditto.

testsuite/ChangeLog:

PR target/81995
* gcc.target/i386/pr46091-4.c: Add -mregparm=2 for 32bit targets.
* gcc.target/i386/pr46091-4a.c: Ditto.

From-SVN: r251369

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr46091-4.c
gcc/testsuite/gcc.target/i386/pr46091-4a.c

index 5a425e3..b1070d9 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/81995
+       * config/i386/i386.md (*<btsc><mode>): Change operand 2
+       predicate to register_operand.  Reorder operands.
+       (*btr<mode>): Ditto.
+       (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
+       (*btr<mode>_mask): Ditto.
+
 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
 
        * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
index f984060..7465848 100644 (file)
   [(set (match_operand:SWI48 0 "register_operand" "=r")
        (any_or:SWI48
          (ashift:SWI48 (const_int 1)
-                       (match_operand:QI 1 "register_operand" "r"))
-         (match_operand:SWI48 2 "nonimmediate_operand" "0")))
+                       (match_operand:QI 2 "register_operand" "r"))
+         (match_operand:SWI48 1 "register_operand" "0")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_BT"
-  "<btsc>{<imodesuffix>}\t{%<k>1, %0|%0, %<k>1}"
+  "<btsc>{<imodesuffix>}\t{%<k>2, %0|%0, %<k>2}"
   [(set_attr "type" "alu1")
    (set_attr "prefix_0f" "1")
    (set_attr "znver1_decode" "double")
              (and:SI
                (match_operand:SI 1 "register_operand")
                (match_operand:SI 2 "const_int_operand")) 0))
-         (match_operand:SWI48 3 "nonimmediate_operand")))
+         (match_operand:SWI48 3 "register_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "(INTVAL (operands[2]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
    == GET_MODE_BITSIZE (<MODE>mode)-1
   [(set (match_operand:SWI48 0 "register_operand" "=r")
        (and:SWI48
          (rotate:SWI48 (const_int -2)
-                       (match_operand:QI 1 "register_operand" "r"))
-       (match_operand:SWI48 2 "nonimmediate_operand" "0")))
+                       (match_operand:QI 2 "register_operand" "r"))
+       (match_operand:SWI48 1 "register_operand" "0")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_BT"
-  "btr{<imodesuffix>}\t{%<k>1, %0|%0, %<k>1}"
+  "btr{<imodesuffix>}\t{%<k>2, %0|%0, %<k>2}"
   [(set_attr "type" "alu1")
    (set_attr "prefix_0f" "1")
    (set_attr "znver1_decode" "double")
              (and:SI
                (match_operand:SI 1 "register_operand")
                (match_operand:SI 2 "const_int_operand")) 0))
-         (match_operand:SWI48 3 "nonimmediate_operand")))
+         (match_operand:SWI48 3 "register_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "(INTVAL (operands[2]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
    == GET_MODE_BITSIZE (<MODE>mode)-1
index f80aaf2..d4bcd42 100644 (file)
@@ -1,3 +1,9 @@
+2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/81995
+       * gcc.target/i386/pr46091-4.c: Add -mregparm=2 for 32bit targets.
+       * gcc.target/i386/pr46091-4a.c: Ditto.
+
 2017-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/81974
index af2cfae..f88ff5e 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-additional-options "-mregparm=2" { target ia32 } } */
 
 int test_1 (int x, int n)
 {
index 5874aee..debbdaa 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-additional-options "-mregparm=2" { target ia32 } } */
 
 int test_1 (int x, int n)
 {