]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ia64.c (rtx_needs_barrier): Handle UNSPEC_FR_SQRT_RECIP_APPROX_RES.
authorJames E Wilson <wilson@tuliptree.org>
Mon, 14 Apr 2008 23:38:40 +0000 (16:38 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 14 Apr 2008 23:38:40 +0000 (16:38 -0700)
* config/ia64/ia64.c (rtx_needs_barrier): Handle
UNSPEC_FR_SQRT_RECIP_APPROX_RES.
* config/ia64/ia64.c (UNSPEC_FR_SQRT_RECIP_APPROX_RES): Define.
(divsi3_internal, divdi3_internal_lat, divdi3_internal_thr,
divsf3_internal_lat, sqrt_approx, sqrtsf2_internal_thr,
divdf3_internal_lat, sqrtdf2_internal_thr, divxf3_internal_lat,
divxf3_internal_thr, sqrtxf2_internal_thr, recip_approx): Use it.

From-SVN: r134295

gcc/ChangeLog
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.md

index d6c2be3715a4ae9f2469f53cf2be1a3255ecf254..e32aeeaa88f88538f6b06ee64d1cefb83fabde12 100644 (file)
@@ -1,3 +1,13 @@
+2008-04-14  James E. Wilson  <wilson@tuliptree.org>
+
+       * config/ia64/ia64.c (rtx_needs_barrier): Handle
+       UNSPEC_FR_SQRT_RECIP_APPROX_RES.
+       * config/ia64/ia64.c (UNSPEC_FR_SQRT_RECIP_APPROX_RES): Define.
+       (divsi3_internal, divdi3_internal_lat, divdi3_internal_thr,
+       divsf3_internal_lat, sqrt_approx, sqrtsf2_internal_thr,
+       divdf3_internal_lat, sqrtdf2_internal_thr, divxf3_internal_lat,
+       divxf3_internal_thr, sqrtxf2_internal_thr, recip_approx): Use it.
+
 2008-04-14  Ian Lance Taylor  <iant@google.com>
 
        * flags.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Define.
index 0658b539702381c238bce4350c35f670b18be809..5b48eba14f517b0d212330bcc8a3a1cc0bfaddbb 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by James E. Wilson <wilson@cygnus.com> and
                  David Mosberger <davidm@hpl.hp.com>.
@@ -5887,6 +5887,7 @@ rtx_needs_barrier (rtx x, struct reg_flags flags, int pred)
        case UNSPEC_SETF_EXP:
         case UNSPEC_ADDP4:
        case UNSPEC_FR_SQRT_RECIP_APPROX:
+       case UNSPEC_FR_SQRT_RECIP_APPROX_RES:
        case UNSPEC_LDA:
        case UNSPEC_LDS:
        case UNSPEC_LDSA:
index 068e607c1e98a3f747d846e383a4834e32be06b2..7135bf4da5857711957879f0f7462708818ea664 100644 (file)
@@ -1,5 +1,5 @@
 ;; IA-64 Machine description template
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 ;; Free Software Foundation, Inc.
 ;; Contributed by James E. Wilson <wilson@cygnus.com> and
 ;;               David Mosberger <davidm@hpl.hp.com>.
@@ -87,6 +87,7 @@
    (UNSPEC_CHKACLR              45)
    (UNSPEC_CHKS                 47)    
    (UNSPEC_FR_RECIP_APPROX_RES  48)
+   (UNSPEC_FR_SQRT_RECIP_APPROX_RES 49)
   ])
 
 (define_constants
   "TARGET_INLINE_INT_DIV"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
+  [(parallel [(set (match_dup 0) (unspec:XF [(const_int 1) (match_dup 2)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 1))])
   "TARGET_INLINE_INT_DIV == INL_MIN_LAT"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
+  [(parallel [(set (match_dup 0) (unspec:XF [(const_int 1) (match_dup 2)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 1))])
   "TARGET_INLINE_INT_DIV == INL_MAX_THR"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
+  [(parallel [(set (match_dup 0) (unspec:XF [(const_int 1) (match_dup 2)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)] 
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 1))])
   "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 6) (div:XF (const_int 1) (match_dup 8)))
+  [(parallel [(set (match_dup 6) (unspec:XF [(const_int 1) (match_dup 8)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 0))])
 (define_insn "*sqrt_approx"
   [(set (match_operand:XF 0 "fr_register_operand" "=f")
         (div:XF (const_int 1)
-                (sqrt:XF (match_operand:XF 2 "fr_register_operand" "f"))))
+               (unspec:XF [(match_operand:XF 2 "fr_register_operand" "f")]
+                          UNSPEC_FR_SQRT_RECIP_APPROX_RES)))
    (set (match_operand:BI 1 "register_operand" "=c")
         (unspec:BI [(match_dup 2)] UNSPEC_FR_SQRT_RECIP_APPROX))
    (use (match_operand:SI 3 "const_int_operand" "")) ]
     ;; y0 = 1/sqrt(a) in f7
     (parallel [(set (match_dup 7)
                     (div:XF (const_int 1)
-                            (sqrt:XF (match_dup 8))))
+                           (unspec:XF [(match_dup 8)]
+                                      UNSPEC_FR_SQRT_RECIP_APPROX_RES)))
                (set (match_dup 6)
                     (unspec:BI [(match_dup 8)]
-                                 UNSPEC_FR_SQRT_RECIP_APPROX))
+                              UNSPEC_FR_SQRT_RECIP_APPROX))
                (use (const_int 0))])
     ;; Step 2
     ;; H0 = 1/2 * y0 in f9
   "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 7) (div:XF (const_int 1) (match_dup 9)))
+  [(parallel [(set (match_dup 7) (unspec:XF [(const_int 1) (match_dup 9)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 6) (unspec:BI [(match_dup 8) (match_dup 9)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 0))])
     ;; y0 = 1/sqrt(a) in f7
     (parallel [(set (match_dup 7)
                     (div:XF (const_int 1)
-                            (sqrt:XF (match_dup 8))))
+                           (unspec:XF [(match_dup 8)]
+                                      UNSPEC_FR_SQRT_RECIP_APPROX_RES)))
                (set (match_dup 6)
                     (unspec:BI [(match_dup 8)]
-                                 UNSPEC_FR_SQRT_RECIP_APPROX))
+                              UNSPEC_FR_SQRT_RECIP_APPROX))
                (use (const_int 0))])
     ;; Step 2
     ;; H0 = 1/2 * y0 in f8
   "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
+  [(parallel [(set (match_dup 0) (unspec:XF [(const_int 1) (match_dup 2)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 7) (unspec:BI [(match_dup 1) (match_dup 2)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 0))])
   "TARGET_INLINE_FLOAT_DIV == INL_MAX_THR"
   "#"
   "&& reload_completed"
-  [(parallel [(set (match_dup 0) (div:XF (const_int 1) (match_dup 2)))
+  [(parallel [(set (match_dup 0) (unspec:XF [(const_int 1) (match_dup 2)]
+                                           UNSPEC_FR_RECIP_APPROX_RES))
              (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)]
                                            UNSPEC_FR_RECIP_APPROX))
              (use (const_int 0))])
     ;; y0 = 1/sqrt(a) in f7
     (parallel [(set (match_dup 8)
                     (div:XF (const_int 1)
-                            (sqrt:XF (match_dup 9))))
+                           (unspec:XF [(match_dup 9)]
+                                      UNSPEC_FR_SQRT_RECIP_APPROX_RES)))
                (set (match_dup 7)
                     (unspec:BI [(match_dup 9)]
-                                 UNSPEC_FR_SQRT_RECIP_APPROX))
+                              UNSPEC_FR_SQRT_RECIP_APPROX))
                (use (const_int 0))])
     ;; Step 2
     ;; H0 = 1/2 * y0 in f9
 
 (define_insn "*recip_approx"
   [(set (match_operand:XF 0 "fr_register_operand" "=f")
-       (div:XF (const_int 1)
-               (match_operand:XF 3 "fr_register_operand" "f")))
+       (unspec:XF [(const_int 1)
+                   (match_operand:XF 3 "fr_register_operand" "f")]
+                  UNSPEC_FR_RECIP_APPROX_RES))
    (set (match_operand:BI 1 "register_operand" "=c")
        (unspec:BI [(match_operand:XF 2 "fr_register_operand" "f")
                    (match_dup 3)] UNSPEC_FR_RECIP_APPROX))