Commit 67405ba4 authored by hubicka's avatar hubicka
Browse files

	* simplify-rtx.c (simplify_relational_operation): Verify that mode ==
	VOIDmode implies both operands to be VOIDmode.
	(simplify_ternary_operation): Compute properly the mode of comparison.
	* combine.c (combine_simplify_rtx): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35343 138bc75d-0d04-0410-961f-82ee72b054a4
parent 2d48cabb
Sun Jul 30 20:08:37 MET DST 2000 Jan Hubicka <jh@suse.cz>
* simplify-rtx.c (simplify_relational_operation): Verify that mode ==
VOIDmode implies both operands to be VOIDmode.
(simplify_ternary_operation): Compute properly the mode of comparison.
* combine.c (combine_simplify_rtx): Likewise.
2000-07-25 Michael Hayes <mph@paradise.net.nz>
 
* basic-block.h (struct loops): New field rc_order.
......
......@@ -3639,8 +3639,13 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
temp = simplify_unary_operation (code, mode, XEXP (x, 0), op0_mode);
break;
case '<':
temp = simplify_relational_operation (code, op0_mode,
XEXP (x, 0), XEXP (x, 1));
{
enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0));
if (cmp_mode == VOIDmode)
cmp_mode = GET_MODE (XEXP (x, 1));
temp = simplify_relational_operation (code, cmp_mode,
XEXP (x, 0), XEXP (x, 1));
}
#ifdef FLOAT_STORE_FLAG_VALUE
if (temp != 0 && GET_MODE_CLASS (mode) == MODE_FLOAT)
{
......
......@@ -1691,6 +1691,11 @@ simplify_relational_operation (code, mode, op0, op1)
int equal, op0lt, op0ltu, op1lt, op1ltu;
rtx tem;
if (mode == VOIDmode
&& (GET_MODE (op0) != VOIDmode
|| GET_MODE (op1) != VOIDmode))
abort();
/* If op0 is a compare, extract the comparison arguments from it. */
if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
op1 = XEXP (op0, 1), op0 = XEXP (op0, 0);
......@@ -1980,8 +1985,11 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2)
return op2;
else if (GET_RTX_CLASS (GET_CODE (op0)) == '<' && ! side_effects_p (op0))
{
enum machine_mode cmp_mode = (GET_MODE (XEXP (op0, 0)) == VOIDmode
? GET_MODE (XEXP (op0, 1))
: GET_MODE (XEXP (op0, 0)));
rtx temp
= simplify_relational_operation (GET_CODE (op0), op0_mode,
= simplify_relational_operation (GET_CODE (op0), cmp_mode,
XEXP (op0, 0), XEXP (op0, 1));
/* See if any simplifications were possible. */
......
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