]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Add TARGET_FLOAT128_HW guard for quad-precision insns
authorHaochen Gui <guihaoc@gcc.gnu.org>
Thu, 15 Aug 2024 05:45:35 +0000 (13:45 +0800)
committerKishan Parmar <kishan@linux.ibm.com>
Tue, 22 Jul 2025 07:13:22 +0000 (12:43 +0530)
gcc/
* config/rs6000/rs6000.md (floatti<mode>2, floatunsti<mode>2,
fix_trunc<mode>ti2): Add guard TARGET_FLOAT128_HW.
* config/rs6000/vsx.md (xsxexpqp_<IEEE128:mode>_<V2DI_DI:mode>,
xsxsigqp_<IEEE128:mode>_<VEC_TI:mode>, xsiexpqpf_<mode>,
xsiexpqp_<IEEE128:mode>_<V2DI_DI:mode>, xscmpexpqp_<code>_<mode>,
*xscmpexpqp, xststdcnegqp_<mode>): Replace guard TARGET_P9_VECTOR
with TARGET_FLOAT128_HW.

gcc/testsuite/
* gcc.target/powerpc/float128-cmp2-runnable.c: Replace
ppc_float128_sw with ppc_float128_hw and remove p9vector_hw.

(cherry picked from commit bf891fcabca7a59ce71e85c8f2eea2bfabbffe59)

gcc/config/rs6000/rs6000.md
gcc/config/rs6000/vsx.md
gcc/testsuite/gcc.target/powerpc/float128-cmp2-runnable.c

index 74b87f926d7b62e4bdf100cda835b47871c51478..bbbd7041a198fc9bc1f22eb1683711fd0c5dd53f 100644 (file)
 (define_insn "floatti<mode>2"
   [(set (match_operand:IEEE128 0 "vsx_register_operand" "=v")
        (float:IEEE128 (match_operand:TI 1 "vsx_register_operand" "v")))]
-  "TARGET_POWER10"
+  "TARGET_POWER10 && TARGET_FLOAT128_HW"
 {
   return  "xscvsqqp %0,%1";
 }
 (define_insn "floatunsti<mode>2"
   [(set (match_operand:IEEE128 0 "vsx_register_operand" "=v")
        (unsigned_float:IEEE128 (match_operand:TI 1 "vsx_register_operand" "v")))]
-  "TARGET_POWER10"
+  "TARGET_POWER10 && TARGET_FLOAT128_HW"
 {
   return  "xscvuqqp %0,%1";
 }
 (define_insn "fix_trunc<mode>ti2"
   [(set (match_operand:TI 0 "vsx_register_operand" "=v")
        (fix:TI (match_operand:IEEE128 1 "vsx_register_operand" "v")))]
-  "TARGET_POWER10"
+  "TARGET_POWER10 && TARGET_FLOAT128_HW"
 {
   return  "xscvqpsqz %0,%1";
 }
index 7a9c19ac903054c3ec39bb0097334ebf4a4dd5de..8665ee7f6dffa1950c46cde387edeeb5daa7ed85 100644 (file)
        (unspec:V2DI_DI
          [(match_operand:IEEE128 1 "altivec_register_operand" "v")]
         UNSPEC_VSX_SXEXPDP))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
   "xsxexpqp %0,%1"
   [(set_attr "type" "vecmove")])
 
        (unspec:VEC_TI [(match_operand:IEEE128 1
                            "altivec_register_operand" "v")]
         UNSPEC_VSX_SXSIG))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
   "xsxsigqp %0,%1"
   [(set_attr "type" "vecmove")])
 
         [(match_operand:IEEE128 1 "altivec_register_operand" "v")
          (match_operand:DI 2 "altivec_register_operand" "v")]
         UNSPEC_VSX_SIEXPQP))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
   "xsiexpqp %0,%1,%2"
   [(set_attr "type" "vecmove")])
 
                         (match_operand:V2DI_DI 2
                          "altivec_register_operand" "v")]
         UNSPEC_VSX_SIEXPQP))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
   "xsiexpqp %0,%1,%2"
   [(set_attr "type" "vecmove")])
 
    (set (match_operand:SI 0 "register_operand" "=r")
        (CMP_TEST:SI (match_dup 3)
                     (const_int 0)))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
 {
   if (<CODE> == UNORDERED && !HONOR_NANS (<MODE>mode))
     {
                          (match_operand:IEEE128 2 "altivec_register_operand" "v")]
          UNSPEC_VSX_SCMPEXPQP)
         (match_operand:SI 3 "zero_constant" "j")))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
   "xscmpexpqp %0,%1,%2"
   [(set_attr "type" "fpcompare")])
 
    (set (match_operand:SI 0 "register_operand" "=r")
        (lt:SI (match_dup 2)
               (const_int 0)))]
-  "TARGET_P9_VECTOR"
+  "TARGET_FLOAT128_HW"
 {
   operands[2] = gen_reg_rtx (CCFPmode);
 })
index d376a3ca68ec9d01f6e3eb3d571ca8847445a74f..f48aa089b05b9afca9f90d2796a5ef91dcc8bade 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do run } */
-/* { dg-require-effective-target ppc_float128_sw } */
-/* { dg-require-effective-target p9vector_hw } */
+/* { dg-require-effective-target ppc_float128_hw } */
 /* { dg-options "-O2 -mdejagnu-cpu=power9 " } */
 
 #define NAN_Q __builtin_nanq ("")