i386.c (ix86_builtin_reciprocal): Remove check for TARGET_RECIP.
* config/i386/i386.c (ix86_builtin_reciprocal): Remove check for TARGET_RECIP. (ix86_emit_swsqrtsf): Do not filter out infinity for rsqrt expansion. From-SVN: r131342
This commit is contained in:
parent
a6514ef2c0
commit
5a37a60ccb
2 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-01-05 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.c (ix86_builtin_reciprocal): Remove check
|
||||
for TARGET_RECIP.
|
||||
(ix86_emit_swsqrtsf): Do not filter out infinity for rsqrt expansion.
|
||||
|
||||
2008-01-05 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||
|
||||
* c-omp.c (check_omp_for_incr_expr): Handle CONVERT_EXPR.
|
||||
|
|
|
@ -21466,7 +21466,7 @@ static tree
|
|||
ix86_builtin_reciprocal (unsigned int fn, bool md_fn,
|
||||
bool sqrt ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (! (TARGET_SSE_MATH && TARGET_RECIP && !optimize_size
|
||||
if (! (TARGET_SSE_MATH && !optimize_size
|
||||
&& flag_finite_math_only && !flag_trapping_math
|
||||
&& flag_unsafe_math_optimizations))
|
||||
return NULL_TREE;
|
||||
|
@ -24239,16 +24239,18 @@ void ix86_emit_swsqrtsf (rtx res, rtx a, enum machine_mode mode,
|
|||
1.0 / sqrt(a) = 0.5 * rsqrtss(a) * (3.0 - a * rsqrtss(a) * rsqrtss(a)) */
|
||||
|
||||
/* Compare a to zero. */
|
||||
emit_insn (gen_rtx_SET (VOIDmode, mask,
|
||||
gen_rtx_NE (mode, zero, a)));
|
||||
if (!recip)
|
||||
emit_insn (gen_rtx_SET (VOIDmode, mask,
|
||||
gen_rtx_NE (mode, zero, a)));
|
||||
|
||||
/* x0 = 1./sqrt(a) estimate */
|
||||
emit_insn (gen_rtx_SET (VOIDmode, x0,
|
||||
gen_rtx_UNSPEC (mode, gen_rtvec (1, a),
|
||||
UNSPEC_RSQRT)));
|
||||
/* Filter out infinity. */
|
||||
emit_insn (gen_rtx_SET (VOIDmode, x0,
|
||||
gen_rtx_AND (mode, x0, mask)));
|
||||
if (!recip)
|
||||
emit_insn (gen_rtx_SET (VOIDmode, x0,
|
||||
gen_rtx_AND (mode, x0, mask)));
|
||||
/* e0 = x0 * a */
|
||||
emit_insn (gen_rtx_SET (VOIDmode, e0,
|
||||
gen_rtx_MULT (mode, x0, a)));
|
||||
|
|
Loading…
Add table
Reference in a new issue