Use PLI to load up 32-bit SImode constants if -mcpu=future.
authorMichael Meissner <meissner@linux.ibm.com>
Tue, 17 Dec 2019 22:16:40 +0000 (22:16 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Tue, 17 Dec 2019 22:16:40 +0000 (22:16 +0000)
2019-12-17  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.md (movsi_internal1): Add alternative to
use PLI to load up 32-bit constants if -mcpu=future.

From-SVN: r279475

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 233771c4f83497d1712429ee4b932ec214ee03de..f8b3ef2231872eec37cf869452a03b806a2d8bde 100644 (file)
@@ -4,6 +4,8 @@
        constant can be loaded with PLI if -mcpu=future.
        * config/rs6000/rs6000.md (movdi_internal64): Add alternative to
        use PLI to load up 34-bit constants if -mcpu=future.
+       (movsi_internal1): Add alternative to use PLI to load up 32-bit
+       constants if -mcpu=future.
 
 2019-12-17  Jakub Jelinek  <jakub@redhat.com>
 
index 31819837f7e0ad406dd1cdcafeb6ab53de8b3c31..6e12d62e23a6b34f574c4349a2c5999be4789ec9 100644 (file)
 ;;        MR          LA
 ;;        LWZ         LFIWZX      LXSIWZX
 ;;        STW         STFIWX      STXSIWX
-;;        LI          LIS         #
+;;        LI          LIS         PLI         #
 ;;        XXLOR       XXSPLTIB 0  XXSPLTIB -1 VSPLTISW
 ;;        XXLXOR 0    XXLORC -1   P9 const
 ;;        MTVSRWZ     MFVSRWZ
          "=r,         r,
           r,          d,          v,
           m,          Z,          Z,
-          r,          r,          r,
+          r,          r,          r,          r,
           wa,         wa,         wa,         v,
           wa,         v,          v,
           wa,         r,
          "r,          U,
           m,          Z,          Z,
           r,          d,          v,
-          I,          L,          n,
+          I,          L,          eI,         n,
           wa,         O,          wM,         wB,
           O,          wM,         wS,
           r,          wa,
    stxsiwx %x1,%y0
    li %0,%1
    lis %0,%v1
+   li %0,%1
    #
    xxlor %x0,%x1,%x1
    xxspltib %x0,0
          "*,          *,
           load,       fpload,     fpload,
           store,      fpstore,    fpstore,
-          *,          *,          *,
+          *,          *,          *,          *,
           veclogical, vecsimple,  vecsimple,  vecsimple,
           veclogical, veclogical, vecsimple,
           mffgpr,     mftgpr,
          "*,          *,
           *,          *,          *,
           *,          *,          *,
-          *,          *,          8,
+          *,          *,          *,          8,
           *,          *,          *,          *,
           *,          *,          8,
           *,          *,
          "*,          *,
           *,          p8v,        p8v,
           *,          p8v,        p8v,
-          *,          *,          *,
+          *,          *,          fut,        *,
           p8v,        p9v,        p9v,        p8v,
           p9v,        p8v,        p9v,
           p8v,        p8v,
 (define_split
   [(set (match_operand:SI 0 "gpc_reg_operand")
        (match_operand:SI 1 "const_int_operand"))]
-  "(unsigned HOST_WIDE_INT) (INTVAL (operands[1]) + 0x8000) >= 0x10000
-   && (INTVAL (operands[1]) & 0xffff) != 0"
+  "num_insns_constant (operands[1], SImode) > 1"
   [(set (match_dup 0)
        (match_dup 2))
    (set (match_dup 0)