Commit 0248ce05 by Alexandre Oliva Committed by Kazu Hirata

simplify-rtx.c (simplify_replace_rtx): Try to obtain mode from old and new…

simplify-rtx.c (simplify_replace_rtx): Try to obtain mode from old and new operands in `<', `3' and `b'.

2001-07-19  Alexandre Oliva  <aoliva@redhat.com>

	* simplify-rtx.c (simplify_replace_rtx): Try to obtain mode from
	old and new operands in `<', `3' and `b'.

From-SVN: r44164
parent e1772ac0
2001-07-19 Alexandre Oliva <aoliva@redhat.com>
* simplify-rtx.c (simplify_replace_rtx): Try to obtain mode from
old and new operands in `<', `3' and `b'.
2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk> 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
* Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h. * Makefile.in (emit-rtl.o, c-decl.o): Depend on debug.h.
......
...@@ -247,21 +247,38 @@ simplify_replace_rtx (x, old, new) ...@@ -247,21 +247,38 @@ simplify_replace_rtx (x, old, new)
simplify_replace_rtx (XEXP (x, 0), old, new), simplify_replace_rtx (XEXP (x, 0), old, new),
simplify_replace_rtx (XEXP (x, 1), old, new)); simplify_replace_rtx (XEXP (x, 1), old, new));
case '<': case '<':
return {
simplify_gen_relational (code, mode, enum machine_mode op_mode = (GET_MODE (XEXP (x, 0)) != VOIDmode
(GET_MODE (XEXP (x, 0)) != VOIDmode ? GET_MODE (XEXP (x, 0))
? GET_MODE (XEXP (x, 0)) : GET_MODE (XEXP (x, 1)));
: GET_MODE (XEXP (x, 1))), rtx op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
simplify_replace_rtx (XEXP (x, 0), old, new), rtx op1 = simplify_replace_rtx (XEXP (x, 1), old, new);
simplify_replace_rtx (XEXP (x, 1), old, new));
return
simplify_gen_relational (code, mode,
(op_mode != VOIDmode
? op_mode
: GET_MODE (op0) != VOIDmode
? GET_MODE (op0)
: GET_MODE (op1)),
op0, op1);
}
case '3': case '3':
case 'b': case 'b':
return {
simplify_gen_ternary (code, mode, GET_MODE (XEXP (x, 0)), enum machine_mode op_mode = GET_MODE (XEXP (x, 0));
simplify_replace_rtx (XEXP (x, 0), old, new), rtx op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
simplify_replace_rtx (XEXP (x, 1), old, new),
simplify_replace_rtx (XEXP (x, 2), old, new)); return
simplify_gen_ternary (code, mode,
(op_mode != VOIDmode
? op_mode
: GET_MODE (op0)),
op0,
simplify_replace_rtx (XEXP (x, 1), old, new),
simplify_replace_rtx (XEXP (x, 2), old, new));
}
case 'x': case 'x':
/* The only case we try to handle is a SUBREG. */ /* The only case we try to handle is a SUBREG. */
......
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