Commit 129e0ee8 by Roger Sayle Committed by Roger Sayle

expr.c (compare_from_rtx): Call simplify_relational_operation on all comparisons...


	* expr.c (compare_from_rtx): Call simplify_relational_operation
	on all comparisons, not just those between integer constants,
	with the correct (possibly unsigned) comparison code.
	(do_compare_rtx_and_jump): Likewise.

From-SVN: r54657
parent 3e1b181a
2002-06-15 Roger Sayle <roger@eyesopen.com>
* expr.c (compare_from_rtx): Call simplify_relational_operation
on all comparisons, not just those between integer constants,
with the correct (possibly unsigned) comparison code.
(do_compare_rtx_and_jump): Likewise.
2002-06-15 John David Anglin <dave@hiauly1.hia.nrc.ca> 2002-06-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
* Makefile.in (tm_defines): New configuration variable. * Makefile.in (tm_defines): New configuration variable.
......
...@@ -10045,6 +10045,7 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size) ...@@ -10045,6 +10045,7 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size)
enum machine_mode mode; enum machine_mode mode;
rtx size; rtx size;
{ {
enum rtx_code ucode;
rtx tem; rtx tem;
/* If one operand is constant, make it the second one. Only do this /* If one operand is constant, make it the second one. Only do this
...@@ -10066,8 +10067,8 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size) ...@@ -10066,8 +10067,8 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size)
do_pending_stack_adjust (); do_pending_stack_adjust ();
if (GET_CODE (op0) == CONST_INT && GET_CODE (op1) == CONST_INT ucode = unsignedp ? unsigned_condition (code) : code;
&& (tem = simplify_relational_operation (code, mode, op0, op1)) != 0) if ((tem = simplify_relational_operation (ucode, mode, op0, op1)) != 0)
return tem; return tem;
#if 0 #if 0
...@@ -10117,6 +10118,7 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, ...@@ -10117,6 +10118,7 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
rtx size; rtx size;
rtx if_false_label, if_true_label; rtx if_false_label, if_true_label;
{ {
enum rtx_code ucode;
rtx tem; rtx tem;
int dummy_true_label = 0; int dummy_true_label = 0;
...@@ -10148,8 +10150,8 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, ...@@ -10148,8 +10150,8 @@ do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
do_pending_stack_adjust (); do_pending_stack_adjust ();
if (GET_CODE (op0) == CONST_INT && GET_CODE (op1) == CONST_INT ucode = unsignedp ? unsigned_condition (code) : code;
&& (tem = simplify_relational_operation (code, mode, op0, op1)) != 0) if ((tem = simplify_relational_operation (ucode, mode, op0, op1)) != 0)
{ {
if (tem == const_true_rtx) if (tem == const_true_rtx)
{ {
......
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