Commit 07acc7b3 by James E Wilson Committed by Jim Wilson

ia64.c (rtx_needs_barrier): Handle UNSPEC_FR_SQRT_RECIP_APPROX_RES.

* 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
parent f3d0f304
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> 2008-04-14 Ian Lance Taylor <iant@google.com>
* flags.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Define. * flags.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Define.
......
/* Definitions of target machine for GNU compiler. /* 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. Free Software Foundation, Inc.
Contributed by James E. Wilson <wilson@cygnus.com> and Contributed by James E. Wilson <wilson@cygnus.com> and
David Mosberger <davidm@hpl.hp.com>. David Mosberger <davidm@hpl.hp.com>.
...@@ -5887,6 +5887,7 @@ rtx_needs_barrier (rtx x, struct reg_flags flags, int pred) ...@@ -5887,6 +5887,7 @@ rtx_needs_barrier (rtx x, struct reg_flags flags, int pred)
case UNSPEC_SETF_EXP: case UNSPEC_SETF_EXP:
case UNSPEC_ADDP4: case UNSPEC_ADDP4:
case UNSPEC_FR_SQRT_RECIP_APPROX: case UNSPEC_FR_SQRT_RECIP_APPROX:
case UNSPEC_FR_SQRT_RECIP_APPROX_RES:
case UNSPEC_LDA: case UNSPEC_LDA:
case UNSPEC_LDS: case UNSPEC_LDS:
case UNSPEC_LDSA: case UNSPEC_LDSA:
......
;; IA-64 Machine description template ;; 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. ;; Free Software Foundation, Inc.
;; Contributed by James E. Wilson <wilson@cygnus.com> and ;; Contributed by James E. Wilson <wilson@cygnus.com> and
;; David Mosberger <davidm@hpl.hp.com>. ;; David Mosberger <davidm@hpl.hp.com>.
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
(UNSPEC_CHKACLR 45) (UNSPEC_CHKACLR 45)
(UNSPEC_CHKS 47) (UNSPEC_CHKS 47)
(UNSPEC_FR_RECIP_APPROX_RES 48) (UNSPEC_FR_RECIP_APPROX_RES 48)
(UNSPEC_FR_SQRT_RECIP_APPROX_RES 49)
]) ])
(define_constants (define_constants
...@@ -2204,7 +2205,8 @@ ...@@ -2204,7 +2205,8 @@
"TARGET_INLINE_INT_DIV" "TARGET_INLINE_INT_DIV"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 1))]) (use (const_int 1))])
...@@ -2617,7 +2619,8 @@ ...@@ -2617,7 +2619,8 @@
"TARGET_INLINE_INT_DIV == INL_MIN_LAT" "TARGET_INLINE_INT_DIV == INL_MIN_LAT"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 6) (unspec:BI [(match_dup 1) (match_dup 2)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 1))]) (use (const_int 1))])
...@@ -2676,7 +2679,8 @@ ...@@ -2676,7 +2679,8 @@
"TARGET_INLINE_INT_DIV == INL_MAX_THR" "TARGET_INLINE_INT_DIV == INL_MAX_THR"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 1))]) (use (const_int 1))])
...@@ -3064,7 +3068,8 @@ ...@@ -3064,7 +3068,8 @@
"TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT" "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 5) (unspec:BI [(match_dup 7) (match_dup 8)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
...@@ -3116,7 +3121,8 @@ ...@@ -3116,7 +3121,8 @@
(define_insn "*sqrt_approx" (define_insn "*sqrt_approx"
[(set (match_operand:XF 0 "fr_register_operand" "=f") [(set (match_operand:XF 0 "fr_register_operand" "=f")
(div:XF (const_int 1) (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") (set (match_operand:BI 1 "register_operand" "=c")
(unspec:BI [(match_dup 2)] UNSPEC_FR_SQRT_RECIP_APPROX)) (unspec:BI [(match_dup 2)] UNSPEC_FR_SQRT_RECIP_APPROX))
(use (match_operand:SI 3 "const_int_operand" "")) ] (use (match_operand:SI 3 "const_int_operand" "")) ]
...@@ -3181,10 +3187,11 @@ ...@@ -3181,10 +3187,11 @@
;; y0 = 1/sqrt(a) in f7 ;; y0 = 1/sqrt(a) in f7
(parallel [(set (match_dup 7) (parallel [(set (match_dup 7)
(div:XF (const_int 1) (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) (set (match_dup 6)
(unspec:BI [(match_dup 8)] (unspec:BI [(match_dup 8)]
UNSPEC_FR_SQRT_RECIP_APPROX)) UNSPEC_FR_SQRT_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
;; Step 2 ;; Step 2
;; H0 = 1/2 * y0 in f9 ;; H0 = 1/2 * y0 in f9
...@@ -3493,7 +3500,8 @@ ...@@ -3493,7 +3500,8 @@
"TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT" "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 6) (unspec:BI [(match_dup 8) (match_dup 9)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
...@@ -3613,10 +3621,11 @@ ...@@ -3613,10 +3621,11 @@
;; y0 = 1/sqrt(a) in f7 ;; y0 = 1/sqrt(a) in f7
(parallel [(set (match_dup 7) (parallel [(set (match_dup 7)
(div:XF (const_int 1) (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) (set (match_dup 6)
(unspec:BI [(match_dup 8)] (unspec:BI [(match_dup 8)]
UNSPEC_FR_SQRT_RECIP_APPROX)) UNSPEC_FR_SQRT_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
;; Step 2 ;; Step 2
;; H0 = 1/2 * y0 in f8 ;; H0 = 1/2 * y0 in f8
...@@ -4092,7 +4101,8 @@ ...@@ -4092,7 +4101,8 @@
"TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT" "TARGET_INLINE_FLOAT_DIV == INL_MIN_LAT"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 7) (unspec:BI [(match_dup 1) (match_dup 2)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
...@@ -4170,7 +4180,8 @@ ...@@ -4170,7 +4180,8 @@
"TARGET_INLINE_FLOAT_DIV == INL_MAX_THR" "TARGET_INLINE_FLOAT_DIV == INL_MAX_THR"
"#" "#"
"&& reload_completed" "&& 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)] (set (match_dup 5) (unspec:BI [(match_dup 1) (match_dup 2)]
UNSPEC_FR_RECIP_APPROX)) UNSPEC_FR_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
...@@ -4290,10 +4301,11 @@ ...@@ -4290,10 +4301,11 @@
;; y0 = 1/sqrt(a) in f7 ;; y0 = 1/sqrt(a) in f7
(parallel [(set (match_dup 8) (parallel [(set (match_dup 8)
(div:XF (const_int 1) (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) (set (match_dup 7)
(unspec:BI [(match_dup 9)] (unspec:BI [(match_dup 9)]
UNSPEC_FR_SQRT_RECIP_APPROX)) UNSPEC_FR_SQRT_RECIP_APPROX))
(use (const_int 0))]) (use (const_int 0))])
;; Step 2 ;; Step 2
;; H0 = 1/2 * y0 in f9 ;; H0 = 1/2 * y0 in f9
...@@ -4406,8 +4418,9 @@ ...@@ -4406,8 +4418,9 @@
(define_insn "*recip_approx" (define_insn "*recip_approx"
[(set (match_operand:XF 0 "fr_register_operand" "=f") [(set (match_operand:XF 0 "fr_register_operand" "=f")
(div:XF (const_int 1) (unspec:XF [(const_int 1)
(match_operand:XF 3 "fr_register_operand" "f"))) (match_operand:XF 3 "fr_register_operand" "f")]
UNSPEC_FR_RECIP_APPROX_RES))
(set (match_operand:BI 1 "register_operand" "=c") (set (match_operand:BI 1 "register_operand" "=c")
(unspec:BI [(match_operand:XF 2 "fr_register_operand" "f") (unspec:BI [(match_operand:XF 2 "fr_register_operand" "f")
(match_dup 3)] UNSPEC_FR_RECIP_APPROX)) (match_dup 3)] UNSPEC_FR_RECIP_APPROX))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment