------- Comment #7 from law at redhat dot com 2006-02-08 17:46 ------- Subject: Re: [4.2 Regression] ICE in duplicate_ssa_name
On Wed, 2006-02-08 at 12:43 +0000, pinskia at gcc dot gnu dot org wrote: > > ------- Comment #4 from pinskia at gcc dot gnu dot org 2006-02-08 12:43 > ------- > (In reply to comment #3) > > I didn't trip over anything like this on my x86 testing, but I have > > been able to reproduce it with a cross compiler. The fix is > > pretty trivial, but it'll take until sometime tomorrow before the > > regression testing and such is complete. > > I should mention why you did not trip over it on the x86 testing orginally. > This: > if (p == 0) > if (do_create) > Was orginally: > if (p == 0 && do_create) > Which causes a slightly different IR. This patch should fix the various instances of the ICE in duplicate_ssa_name. Basically VRP performed a constant propagation, changing the index in an array reference from a variable to a constant. When this occurs we queue SSA graph updates for the virtual operands of the statement. As a side effect, the virtual operands are no longer SSA_NAMEs, but instead _DECL nodes. We then find that we're able to thread through the block containing the updated array reference. The block duplication code doesn't know how to handle this case and dies. This patch simply handles any queued SSA updates before dealing with jump threads. DOM does the exact same thing. However, my gut tells me that this "solution" is mostly an artifact of how the old old old SSA graph updating code in DOM worked. I suspect that it wouldn't be terribly difficult to do all the SSA graph updates at the same time. Doing so would probably be a compile-time win as well. Regardless, this patch should bring various failing targets back into bootstrap land. Bootstrapped and regression tested on i686-pc-linux-gnu; I've also verified the ICE is fixed using cross compilers. ------- Comment #8 from law at redhat dot com 2006-02-08 17:46 ------- Created an attachment (id=10803) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10803&action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26169