Commit 1cac8785 by DJ Delorie Committed by DJ Delorie

combine.c (combine_simplify_rtx): If the modes are all VOIDmode, check the…

combine.c (combine_simplify_rtx): If the modes are all VOIDmode, check the original operand's mode also.

* combine.c (combine_simplify_rtx): If the modes are all VOIDmode,
check the original operand's mode also.
* simplify-rtx.c (simplify_ternary_operation): Ditto.

From-SVN: r39247
parent cedd825f
2001-01-24 DJ Delorie <dj@redhat.com>
* combine.c (combine_simplify_rtx): If the modes are all VOIDmode,
check the original operand's mode also.
* simplify-rtx.c (simplify_ternary_operation): Ditto.
2001-01-24 Joseph S. Myers <jsm28@cam.ac.uk> 2001-01-24 Joseph S. Myers <jsm28@cam.ac.uk>
* c-parse.in (cast_expr): Move compound literals from here ... * c-parse.in (cast_expr): Move compound literals from here ...
......
...@@ -3654,7 +3654,11 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) ...@@ -3654,7 +3654,11 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
{ {
enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0)); enum machine_mode cmp_mode = GET_MODE (XEXP (x, 0));
if (cmp_mode == VOIDmode) if (cmp_mode == VOIDmode)
cmp_mode = GET_MODE (XEXP (x, 1)); {
cmp_mode = GET_MODE (XEXP (x, 1));
if (cmp_mode == VOIDmode)
cmp_mode = op0_mode;
}
temp = simplify_relational_operation (code, cmp_mode, temp = simplify_relational_operation (code, cmp_mode,
XEXP (x, 0), XEXP (x, 1)); XEXP (x, 0), XEXP (x, 1));
} }
......
...@@ -2057,6 +2057,8 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2) ...@@ -2057,6 +2057,8 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2)
enum machine_mode cmp_mode = (GET_MODE (XEXP (op0, 0)) == VOIDmode enum machine_mode cmp_mode = (GET_MODE (XEXP (op0, 0)) == VOIDmode
? GET_MODE (XEXP (op0, 1)) ? GET_MODE (XEXP (op0, 1))
: GET_MODE (XEXP (op0, 0))); : GET_MODE (XEXP (op0, 0)));
if (cmp_mode == VOIDmode)
cmp_mode = op0_mode;
rtx temp rtx temp
= simplify_relational_operation (GET_CODE (op0), cmp_mode, = simplify_relational_operation (GET_CODE (op0), cmp_mode,
XEXP (op0, 0), XEXP (op0, 1)); XEXP (op0, 0), XEXP (op0, 1));
......
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