On 3/15/07, Alexandre Oliva <[EMAIL PROTECTED]> wrote:
> Recent committed patch breaks i386ssefp-2.c testcase, where maxsd is > not generated anymore. FWIW, I saw it both before and after the patch for PR 31127. I've just tried reverting PR 30643 as well, but the problem remains. So it's unrelated. Have you been able to narrow it down to any other patch?
Yes, bisection found that steven's patch is guilty as charged ;> --- gcc/ChangeLog (revision 122856) +++ gcc/ChangeLog (revision 122858) @@ -1,3 +1,12 @@ +2007-03-12 Steven Bosscher <[EMAIL PROTECTED]> + + * tree-pass.h (pass_into_cfg_layout_mode, + pass_outof_cfg_layout_mode): Declare. + * cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode, + pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New. + * passes.c (pass_into_cfg_layout_mode): Schedule before jump2. + (pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt. + Steven, I have been looking into this failure a bit, and found that ifcvt during first pass is rejected in find_if_block(), at: /* The THEN block of an IF-THEN combo must have exactly one predecessor, other than any || blocks which jump to the THEN block. */ if ((EDGE_COUNT (then_bb->preds) - ce_info->num_or_or_blocks) != 1) return FALSE; For some reason, EDGE_COUNT (then_bb->preds) returns 2 (where ce_info->n_o_o_blocks = 0). Strangely, bb3 ("else" block that fails) has: Basic block 3 , prev 2, next 4, loop_depth 0, count 0, freq 4600, maybe hot. Predecessors: 2 [46.0%] Successors: 4 [100.0%] (fallthru) The testcase is: double x; q() { x=x<5?5:x; } compile this with -O2 -msse2 -mfpmath=sse, and this testcase should compile to maxsd. Uros.