Commit e37f6a49 by Steven Bosscher Committed by John David Anglin

re PR middle-end/34627 (Incorrect branching with -Ox on hppa)

	PR middle-end/34627
	combine.c (simplify_if_then_else): Make sure the comparison is
	against const0_rtx when simplifying to (abs x) or (neg (abs X)).

From-SVN: r132193
parent 26494079
2008-02-08 Steven Bosscher <stevenb.gcc@gmail.com>
PR middle-end/34627
combine.c (simplify_if_then_else): Make sure the comparison is
against const0_rtx when simplifying to (abs x) or (neg (abs X)).
2008-02-08 Richard Sandiford <rsandifo@nildram.co.uk> 2008-02-08 Richard Sandiford <rsandifo@nildram.co.uk>
PR bootstrap/35051 PR bootstrap/35051
......
...@@ -5393,9 +5393,10 @@ simplify_if_then_else (rtx x) ...@@ -5393,9 +5393,10 @@ simplify_if_then_else (rtx x)
/* Look for cases where we have (abs x) or (neg (abs X)). */ /* Look for cases where we have (abs x) or (neg (abs X)). */
if (GET_MODE_CLASS (mode) == MODE_INT if (GET_MODE_CLASS (mode) == MODE_INT
&& comparison_p
&& XEXP (cond, 1) == const0_rtx
&& GET_CODE (false_rtx) == NEG && GET_CODE (false_rtx) == NEG
&& rtx_equal_p (true_rtx, XEXP (false_rtx, 0)) && rtx_equal_p (true_rtx, XEXP (false_rtx, 0))
&& comparison_p
&& rtx_equal_p (true_rtx, XEXP (cond, 0)) && rtx_equal_p (true_rtx, XEXP (cond, 0))
&& ! side_effects_p (true_rtx)) && ! side_effects_p (true_rtx))
switch (true_code) switch (true_code)
......
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