re PR target/37055 (Revision 138835 breaks -msse2 -mfpmath=sse -Os)
2008-08-09 Jan Hubicka <jh@suse.cz> PR target/37055 * optabs.c (maybe_emit_unop_insn): Remove produced code if expansion failed. (expand_fix): Be prepared for expansion to fail. (expand_sfix_optab): Remove instructions if expansion failed. From-SVN: r138916
This commit is contained in:
parent
708fa3b5df
commit
5e04ef8f80
@ -1,3 +1,11 @@
|
||||
2008-08-09 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR target/37055
|
||||
* optabs.c (maybe_emit_unop_insn): Remove produced code if
|
||||
expansion failed.
|
||||
(expand_fix): Be prepared for expansion to fail.
|
||||
(expand_sfix_optab): Remove instructions if expansion failed.
|
||||
|
||||
2008-08-09 Anatoly Sokolov <aesok@post.ru>
|
||||
|
||||
* config/avr/avr.c (avr_mcu_types): Move the AT43USB320 device to
|
||||
|
26
gcc/optabs.c
26
gcc/optabs.c
@ -3769,6 +3769,7 @@ maybe_emit_unop_insn (int icode, rtx target, rtx op0, enum rtx_code code)
|
||||
rtx temp;
|
||||
enum machine_mode mode0 = insn_data[icode].operand[1].mode;
|
||||
rtx pat;
|
||||
rtx last = get_last_insn ();
|
||||
|
||||
temp = target;
|
||||
|
||||
@ -3782,7 +3783,10 @@ maybe_emit_unop_insn (int icode, rtx target, rtx op0, enum rtx_code code)
|
||||
|
||||
pat = GEN_FCN (icode) (temp, op0);
|
||||
if (!pat)
|
||||
return false;
|
||||
{
|
||||
delete_insns_since (last);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (INSN_P (pat) && NEXT_INSN (pat) != NULL_RTX && code != UNKNOWN)
|
||||
add_equal_note (pat, temp, code, op0, NULL_RTX);
|
||||
@ -5157,6 +5161,7 @@ expand_fix (rtx to, rtx from, int unsignedp)
|
||||
|
||||
if (icode != CODE_FOR_nothing)
|
||||
{
|
||||
rtx last = get_last_insn ();
|
||||
if (fmode != GET_MODE (from))
|
||||
from = convert_to_mode (fmode, from, 0);
|
||||
|
||||
@ -5170,11 +5175,14 @@ expand_fix (rtx to, rtx from, int unsignedp)
|
||||
if (imode != GET_MODE (to))
|
||||
target = gen_reg_rtx (imode);
|
||||
|
||||
emit_unop_insn (icode, target, from,
|
||||
doing_unsigned ? UNSIGNED_FIX : FIX);
|
||||
if (target != to)
|
||||
convert_move (to, target, unsignedp);
|
||||
return;
|
||||
if (maybe_emit_unop_insn (icode, target, from,
|
||||
doing_unsigned ? UNSIGNED_FIX : FIX))
|
||||
{
|
||||
if (target != to)
|
||||
convert_move (to, target, unsignedp);
|
||||
return;
|
||||
}
|
||||
delete_insns_since (last);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5382,6 +5390,7 @@ expand_sfix_optab (rtx to, rtx from, convert_optab tab)
|
||||
icode = convert_optab_handler (tab, imode, fmode)->insn_code;
|
||||
if (icode != CODE_FOR_nothing)
|
||||
{
|
||||
rtx last = get_last_insn ();
|
||||
if (fmode != GET_MODE (from))
|
||||
from = convert_to_mode (fmode, from, 0);
|
||||
|
||||
@ -5389,7 +5398,10 @@ expand_sfix_optab (rtx to, rtx from, convert_optab tab)
|
||||
target = gen_reg_rtx (imode);
|
||||
|
||||
if (!maybe_emit_unop_insn (icode, target, from, UNKNOWN))
|
||||
return false;
|
||||
{
|
||||
delete_insns_since (last);
|
||||
continue;
|
||||
}
|
||||
if (target != to)
|
||||
convert_move (to, target, 0);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user