This looks like fallout from
2002-05-03 Richard Henderson <rth@redhat.com>
PR opt/6534
* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
noce_try_store_flag_inc, noce_try_store_flag_mask, noce_try_cmove,
noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Insert new
code before JUMP, not EARLIEST.
I'm testing the following on x86. Give it a whirl on ppc as well?
r~
* ifcvt.c (noce_get_condition): Make certain that the condition
is valid at JUMP.
That fixes the small executable testcase I posted and inspection of the
assembly shows that the original mozilla source code is fine too now.
Bootstrap and regression testing on powerpc-linux-gnu without problems.