On 08/13/2012 02:44 PM, Jakub Jelinek wrote:
Hi!
move_unallocated_pseudos apparently relies on no insns being deleted
in between find_moveable_pseudos and itself, which can happen when
delete_trivially_dead_insns removes dead insns and insns that feed them.
This can be fixed either by moving the delete_trivially_dead_insns
call earlier in ira function (is there anything in between those lines that
could create trivially dead insns?),
I can not imagine what can create trivially dead insns between those
lines. So this solution is ok.
as done in this patch, or e.g. as done
in the first patch in the PR can be fixed by making move_unallocated_pseudos
more tollerant to insns being removed.
I've bootstrapped/regtested this on x86_64-linux and i686-linux, ok for
trunk (or is the patch in the PR preferred, or something else)?
Ok. Thanks for fixing this bug, Jakub.
2012-08-13 Jakub Jelinek <ja...@redhat.com>
PR middle-end/53411
PR rtl-optimization/53495
* ira.c (ira): Move delete_trivially_dead_insns call before
find_moveable_pseudos call.
* gcc.c-torture/compile/pr53411.c: New test.
* gcc.c-torture/compile/pr53495.c: New test.