diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 23:38:40 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 23:38:40 +0000 |
commit | aaff414bbed8f3590b3cc2b95cc1fe2029906e2d (patch) | |
tree | 575c0259df59969d698d48d5be10ea746900c51c /gcc | |
parent | 2c145f840c7cda0c0542b282a8677a854754a5dd (diff) | |
download | ppe42-gcc-aaff414bbed8f3590b3cc2b95cc1fe2029906e2d.tar.gz ppe42-gcc-aaff414bbed8f3590b3cc2b95cc1fe2029906e2d.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134295 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 3 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.md | 47 |
3 files changed, 42 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6c2be3715a..e32aeeaa88f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 0658b539702..5b48eba14f5 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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: diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md index 068e607c1e9..7135bf4da58 100644 --- a/gcc/config/ia64/ia64.md +++ b/gcc/config/ia64/ia64.md @@ -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 @@ -2204,7 +2205,8 @@ "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))]) @@ -2617,7 +2619,8 @@ "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))]) @@ -2676,7 +2679,8 @@ "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))]) @@ -3064,7 +3068,8 @@ "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))]) @@ -3116,7 +3121,8 @@ (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" "")) ] @@ -3181,10 +3187,11 @@ ;; 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 @@ -3493,7 +3500,8 @@ "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))]) @@ -3613,10 +3621,11 @@ ;; 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 @@ -4092,7 +4101,8 @@ "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))]) @@ -4170,7 +4180,8 @@ "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))]) @@ -4290,10 +4301,11 @@ ;; 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 @@ -4406,8 +4418,9 @@ (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)) |