Commit d5a4ebdc by Richard Kenner

(simplify_if_then_else): Don't make (mult (cond)) in simple case;

leave as IF_THEN_ELSE instead.

From-SVN: r7351
parent 8322308e
...@@ -4032,10 +4032,7 @@ simplify_if_then_else (x) ...@@ -4032,10 +4032,7 @@ simplify_if_then_else (x)
C2 = C1 * STORE_FLAG_VALUE. Similarly if OP has an outer ZERO_EXTEND or C2 = C1 * STORE_FLAG_VALUE. Similarly if OP has an outer ZERO_EXTEND or
SIGN_EXTEND as long as Z is already extended (so we don't destroy it). SIGN_EXTEND as long as Z is already extended (so we don't destroy it).
We can do this kind of thing in some cases when STORE_FLAG_VALUE is We can do this kind of thing in some cases when STORE_FLAG_VALUE is
neither of the above, but it isn't worth checking for. neither of the above, but it isn't worth checking for. */
Similarly, (if_then_else COND Z 0) can be replaced by
(mult COND (mult Z STORE_FLAG_VALUE)). */
if (comparison_p && mode != VOIDmode && ! side_effects_p (x)) if (comparison_p && mode != VOIDmode && ! side_effects_p (x))
{ {
...@@ -4047,11 +4044,6 @@ simplify_if_then_else (x) ...@@ -4047,11 +4044,6 @@ simplify_if_then_else (x)
enum machine_mode m = mode; enum machine_mode m = mode;
rtx z = 0, c1; rtx z = 0, c1;
if (f == const0_rtx)
return gen_binary (MULT, mode, gen_binary (true_code, mode, cond_op0,
cond_op1),
gen_binary (MULT, mode, t, const_true_rtx));
if ((GET_CODE (t) == PLUS || GET_CODE (t) == MINUS if ((GET_CODE (t) == PLUS || GET_CODE (t) == MINUS
|| GET_CODE (t) == IOR || GET_CODE (t) == XOR || GET_CODE (t) == IOR || GET_CODE (t) == XOR
|| GET_CODE (t) == ASHIFT || GET_CODE (t) == ASHIFT
......
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