Commit 17796a89 by Roger Sayle Committed by Roger Sayle

optabs.c (prepare_float_lib_cmp): Always attach a REG_EQUAL note to the comparison...


	* optabs.c (prepare_float_lib_cmp): Always attach a REG_EQUAL note
	to the comparison, as emit_libcall_block calls copy_rtx on equiv.

From-SVN: r72262
parent 569fa502
2003-10-09 Roger Sayle <roger@eyesopen.com>
* optabs.c (prepare_float_lib_cmp): Always attach a REG_EQUAL note
to the comparison, as emit_libcall_block calls copy_rtx on equiv.
2003-10-09 Dorit Naishlos <dorit@il.ibm.com> 2003-10-09 Dorit Naishlos <dorit@il.ibm.com>
* haifa-sched.c (ok_for_early_schedule): New function. * haifa-sched.c (ok_for_early_schedule): New function.
......
...@@ -3871,13 +3871,9 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison, ...@@ -3871,13 +3871,9 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison,
y = convert_to_mode (mode, y, 0); y = convert_to_mode (mode, y, 0);
} }
/* If we're optimizing attach a REG_EQUAL note describing the semantics /* Attach a REG_EQUAL note describing the semantics of the libcall to
of the libcall to the RTL. The allows the RTL optimizers to delete the RTL. The allows the RTL optimizers to delete the libcall if the
the libcall if the condition can be determined at compile-time. */ condition can be determined at compile-time. */
if (optimize
&& ! side_effects_p (x)
&& ! side_effects_p (y))
{
if (comparison == UNORDERED) if (comparison == UNORDERED)
{ {
rtx temp = simplify_gen_relational (NE, word_mode, mode, x, x); rtx temp = simplify_gen_relational (NE, word_mode, mode, x, x);
...@@ -3927,14 +3923,10 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison, ...@@ -3927,14 +3923,10 @@ prepare_float_lib_cmp (rtx *px, rtx *py, enum rtx_code *pcomparison,
default: default:
abort (); abort ();
} }
equiv = simplify_gen_ternary (IF_THEN_ELSE, word_mode, equiv = simplify_gen_ternary (IF_THEN_ELSE, word_mode, word_mode,
word_mode, equiv, equiv, true_rtx, false_rtx);
true_rtx, false_rtx);
}
} }
} }
else
equiv = NULL_RTX;
start_sequence (); start_sequence ();
value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST, value = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST,
......
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