re PR target/80123 (libgomp tests pr66199-2.c and pr66199-5.c fail with -mcpu=power9)
authorAaron Sawdey <acsawdey@linux.vnet.ibm.com>
Wed, 22 Mar 2017 17:47:55 +0000 (17:47 +0000)
committerAaron Sawdey <acsawdey@gcc.gnu.org>
Wed, 22 Mar 2017 17:47:55 +0000 (12:47 -0500)
2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

PR target/80123
* doc/md.texi (Constraints): Document wA constraint.
* config/rs6000/constraints.md (wA): New.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
(rs6000_init_hard_regno_mode_ok): Init wA constraint.
* config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
* config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.

From-SVN: r246394

gcc/ChangeLog
gcc/config/rs6000/constraints.md
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/vsx.md
gcc/doc/md.texi

index f7202cf0b9017e9ac88b9290e866043b115b18b1..eaf765086213b14f7734ed3ec38e83bbc216f305 100644 (file)
@@ -1,3 +1,13 @@
+2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
+
+       PR target/80123
+       * doc/md.texi (Constraints): Document wA constraint.
+       * config/rs6000/constraints.md (wA): New.
+       * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
+       (rs6000_init_hard_regno_mode_ok): Init wA constraint.
+       * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
+       * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
+
 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
 
        PR c++/80029
index 3165124a26f1f28e46113688c1af6e920e9d122a..44f45d8b676123788c2688f124c035471ba7d709 100644 (file)
 (define_register_constraint "wz" "rs6000_constraints[RS6000_CONSTRAINT_wz]"
   "Floating point register if the LFIWZX instruction is enabled or NO_REGS.")
 
+(define_register_constraint "wA" "rs6000_constraints[RS6000_CONSTRAINT_wA]"
+  "BASE_REGS if 64-bit instructions are enabled or NO_REGS.")
+
 ;; wB needs ISA 2.07 VUPKHSW
 (define_constraint "wB"
   "Signed 5-bit constant integer that can be loaded into an altivec register."
index f8600b8124cdd0bd2cfc42459419922beb1a376f..9db85e698d589836c05e395547c475f693fb4b57 100644 (file)
@@ -2468,6 +2468,7 @@ rs6000_debug_reg_global (void)
           "wx reg_class = %s\n"
           "wy reg_class = %s\n"
           "wz reg_class = %s\n"
+          "wA reg_class = %s\n"
           "wH reg_class = %s\n"
           "wI reg_class = %s\n"
           "wJ reg_class = %s\n"
@@ -2500,6 +2501,7 @@ rs6000_debug_reg_global (void)
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wx]],
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wy]],
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wz]],
+          reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wA]],
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wH]],
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wI]],
           reg_class_names[rs6000_constraints[RS6000_CONSTRAINT_wJ]],
@@ -3210,7 +3212,10 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p)
     }
 
   if (TARGET_POWERPC64)
-    rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
+    {
+      rs6000_constraints[RS6000_CONSTRAINT_wr] = GENERAL_REGS;
+      rs6000_constraints[RS6000_CONSTRAINT_wA] = BASE_REGS;
+    }
 
   if (TARGET_P8_VECTOR && TARGET_UPPER_REGS_SF)                        /* SFmode  */
     {
index da6fd522f9dbcdcdad29d33576a3299a10762058..3780a49d902b3c3519cc59aa7f08b42deb137bc5 100644 (file)
@@ -1612,6 +1612,7 @@ enum r6000_reg_class_enum {
   RS6000_CONSTRAINT_wx,                /* FPR register for STFIWX */
   RS6000_CONSTRAINT_wy,                /* VSX register for SF */
   RS6000_CONSTRAINT_wz,                /* FPR register for LFIWZX */
+  RS6000_CONSTRAINT_wA,                /* BASE_REGS if 64-bit.  */
   RS6000_CONSTRAINT_wH,                /* Altivec register for 32-bit integers.  */
   RS6000_CONSTRAINT_wI,                /* VSX register for 32-bit integers.  */
   RS6000_CONSTRAINT_wJ,                /* VSX register for 8/16-bit integers.  */
index f4f1663b36d6c148c3bb6a11f48b3a1b579431a6..bfc15270bb0ae601e545cc68ee5519e3d1a7d376 100644 (file)
                                        "=<VSa>,    <VSa>,we,<VS_64dm>")
        (vec_duplicate:VSX_D
         (match_operand:<VS_scalar> 1 "splat_input_operand"
-                                       "<VS_64reg>,Z,    b, wr")))]
+                                       "<VS_64reg>,Z,    b, wA")))]
   "VECTOR_MEM_VSX_P (<MODE>mode)"
   "@
    xxpermdi %x0,%x1,%x1,0
index c9d937d7195c54306c2176f0c8f93e616ff18aec..dde3644890e3de3612a487966e29395cd76cb670 100644 (file)
@@ -3122,6 +3122,9 @@ FP or VSX register to perform ISA 2.07 float ops or NO_REGS.
 @item wz
 Floating point register if the LFIWZX instruction is enabled or NO_REGS.
 
+@item wA
+Address base register if 64-bit instructions are enabled or NO_REGS.
+
 @item wB
 Signed 5-bit constant integer that can be loaded into an altivec register.