rs6000.md (movdi_internal32): Change constraints so that DImode can be allocated...
authorMichael Meissner <meissner@linux.vnet.ibm.com>
Mon, 21 Nov 2016 20:35:21 +0000 (20:35 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Mon, 21 Nov 2016 20:35:21 +0000 (20:35 +0000)
[gcc]
2016-11-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

* config/rs6000/rs6000.md (movdi_internal32): Change constraints
so that DImode can be allocated to FP/vector registers in more
cases, and we can avoid direct move operations.  If the register
needs reloading, prefer GPRs over FP/vector registers.  In the
case of FPR vs. Altivec registers, prefer FPR registers unless we
have the ISA 3.0 reg+offset scalar instructions.
(movdi_internal64): Likewise.

[gcc/testsuite]
2016-11-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/ppc-round2.c: Allow XSCVDPSXWS and XSCVDPUXWS
to be generated instead of FCTIWUZ or FCTIWZ.

From-SVN: r242679

gcc/ChangeLog
gcc/config/rs6000/rs6000.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/ppc-round2.c

index 9cb252625bfd80eb6bfafba7ff689c5eed7a7e89..842e8ff5f2c4df5b6afd87cf0c514b09c598ac32 100644 (file)
@@ -1,3 +1,13 @@
+2016-11-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       * config/rs6000/rs6000.md (movdi_internal32): Change constraints
+       so that DImode can be allocated to FP/vector registers in more
+       cases, and we can avoid direct move operations.  If the register
+       needs reloading, prefer GPRs over FP/vector registers.  In the
+       case of FPR vs. Altivec registers, prefer FPR registers unless we
+       have the ISA 3.0 reg+offset scalar instructions.
+       (movdi_internal64): Likewise.
+
 2016-11-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/67335
index acd4a7e508b43dc721b4da7e9f2ec377a1845dbe..c932dac75a46d02e25ef4814cdb0cfad32484e9d 100644 (file)
 
 (define_insn "*movdi_internal32"
   [(set (match_operand:DI 0 "rs6000_nonimmediate_operand"
-         "=Y,        r,         r,         ?m,        ?*d,        ?*d,
-          r,         ?wY,       ?Z,        ?*wb,      ?*wv,       ?wi,
-          ?wo,       ?wo,       ?wv,       ?wi,       ?wi,        ?wv,
-          ?wv")
+         "=Y,        r,         r,         ^m,        ^d,         ^d,
+          r,         ^wY,       $Z,        ^wb,       $wv,        ^wi,
+          *wo,       *wo,       *wv,       *wi,       *wi,        *wv,
+          *wv")
 
        (match_operand:DI 1 "input_operand"
           "r,        Y,         r,         d,         m,          d,
 (define_insn "*movdi_internal64"
   [(set (match_operand:DI 0 "nonimmediate_operand"
                "=Y,        r,         r,         r,         r,          r,
-                ?m,        ?*d,       ?*d,       ?wY,       ?Z,         ?*wb,
-                ?*wv,      ?wi,       ?wo,       ?wo,       ?wv,        ?wi,
-                ?wi,       ?wv,       ?wv,       r,         *h,         *h,
+                ^m,        ^d,        ^d,        ^Y,        $Z,         $wb,
+                $wv,       ^wi,       *wo,       *wo,       *wv,        *wi,
+                *wi,       *wv,       *wv,       r,         *h,         *h,
                 ?*r,       ?*wg,      ?*r,       ?*wj")
 
        (match_operand:DI 1 "input_operand"
index dd89d8865038fa70e586217985d01f95cdbc9c44..cef6a27712944d5cc199f8a77d8a3a6f5575c9d3 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       * gcc.target/powerpc/ppc-round2.c: Allow XSCVDPSXWS and XSCVDPUXWS
+       to be generated instead of FCTIWUZ or FCTIWZ.
+
 2016-11-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/67335
index 39375a0e9d54a7bbed19fa49b0836d71a1d51634..1890fca10be085b36111aa2b495a9ab9b6b4e73e 100644 (file)
@@ -5,8 +5,8 @@
 /* { dg-options "-O2 -mcpu=power8" } */
 /* { dg-final { scan-assembler-times "fcfid "      2 } } */
 /* { dg-final { scan-assembler-times "fcfids "     2 } } */
-/* { dg-final { scan-assembler-times "fctiwuz "    2 } } */
-/* { dg-final { scan-assembler-times "fctiwz "     2 } } */
+/* { dg-final { scan-assembler-times "fctiwuz \|xscvdpuxws " 2 } } */
+/* { dg-final { scan-assembler-times "fctiwz \|xscvdpsxws "  2 } } */
 /* { dg-final { scan-assembler-times "mfvsrd "     4 } } */
 /* { dg-final { scan-assembler-times "mtvsrwa "    2 } } */
 /* { dg-final { scan-assembler-times "mtvsrwz "    2 } } */