real.c (c4x_single_format, [...]): Provide values for signbit_ro for c4x's single and extended floating point formats.
* real.c (c4x_single_format, c4x_extended_format): Provide values for signbit_ro for c4x's single and extended floating point formats. * optabs.c (expand_copysign): Use the floating point format's signbit_ro for expanding via expand_copysign_absneg, and it's signbit_rw field for expanding via expand_copysign_bit. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r96530
This commit is contained in:
parent
813edff1aa
commit
c064fde513
@ -1,3 +1,12 @@
|
||||
2005-03-15 Roger Sayle <roger@eyesopen.com>
|
||||
Richard Henderson <rth@redhat.com>
|
||||
|
||||
* real.c (c4x_single_format, c4x_extended_format): Provide values
|
||||
for signbit_ro for c4x's single and extended floating point formats.
|
||||
* optabs.c (expand_copysign): Use the floating point format's
|
||||
signbit_ro for expanding via expand_copysign_absneg, and it's
|
||||
signbit_rw field for expanding via expand_copysign_bit.
|
||||
|
||||
2005-03-15 Dorit Naishlos <dorit@il.ibm.com>
|
||||
|
||||
* tree-vectorizer.h (unknown_alignment_for_access_p): Replaced by
|
||||
|
19
gcc/optabs.c
19
gcc/optabs.c
@ -2865,7 +2865,6 @@ expand_copysign (rtx op0, rtx op1, rtx target)
|
||||
{
|
||||
enum machine_mode mode = GET_MODE (op0);
|
||||
const struct real_format *fmt;
|
||||
int bitpos;
|
||||
bool op0_is_abs;
|
||||
rtx temp;
|
||||
|
||||
@ -2882,10 +2881,6 @@ expand_copysign (rtx op0, rtx op1, rtx target)
|
||||
if (fmt == NULL || !fmt->has_signed_zero)
|
||||
return NULL_RTX;
|
||||
|
||||
bitpos = fmt->signbit_rw;
|
||||
if (bitpos < 0)
|
||||
return NULL_RTX;
|
||||
|
||||
op0_is_abs = false;
|
||||
if (GET_CODE (op0) == CONST_DOUBLE)
|
||||
{
|
||||
@ -2894,17 +2889,21 @@ expand_copysign (rtx op0, rtx op1, rtx target)
|
||||
op0_is_abs = true;
|
||||
}
|
||||
|
||||
if (GET_CODE (op0) == CONST_DOUBLE
|
||||
|| (neg_optab->handlers[mode].insn_code != CODE_FOR_nothing
|
||||
&& abs_optab->handlers[mode].insn_code != CODE_FOR_nothing))
|
||||
if (fmt->signbit_ro >= 0
|
||||
&& (GET_CODE (op0) == CONST_DOUBLE
|
||||
|| (neg_optab->handlers[mode].insn_code != CODE_FOR_nothing
|
||||
&& abs_optab->handlers[mode].insn_code != CODE_FOR_nothing)))
|
||||
{
|
||||
temp = expand_copysign_absneg (mode, op0, op1, target,
|
||||
bitpos, op0_is_abs);
|
||||
fmt->signbit_ro, op0_is_abs);
|
||||
if (temp)
|
||||
return temp;
|
||||
}
|
||||
|
||||
return expand_copysign_bit (mode, op0, op1, target, bitpos, op0_is_abs);
|
||||
if (fmt->signbit_rw < 0)
|
||||
return NULL_RTX;
|
||||
return expand_copysign_bit (mode, op0, op1, target,
|
||||
fmt->signbit_rw, op0_is_abs);
|
||||
}
|
||||
|
||||
/* Generate an instruction whose insn-code is INSN_CODE,
|
||||
|
@ -4414,7 +4414,7 @@ const struct real_format c4x_single_format =
|
||||
24,
|
||||
-126,
|
||||
128,
|
||||
-1,
|
||||
23,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
@ -4433,7 +4433,7 @@ const struct real_format c4x_extended_format =
|
||||
32,
|
||||
-126,
|
||||
128,
|
||||
-1,
|
||||
31,
|
||||
-1,
|
||||
false,
|
||||
false,
|
||||
|
Loading…
Reference in New Issue
Block a user