Created attachment 23110 [details] This is the input file to the compiler that produces an ICE. To reproduce, use the attached file and run: g++ -o /dev/null -S -O3 reduced.manual.inline.cc You will get this message: Unable to coalesce ssa_names <x> and <y> which are marked as MUST COALESCE. This is reproducible with the latest (as of Jan 20th, 2011) 4-4 branch of gcc. It seems to not happen with the trunk.
Confirmed.
It seems like this bug is reproducible on older versions of the trunk. This change: http://gcc.gnu.org/viewcvs?view=revision&revision=146776 seems to suppress it (or fix it?). Jan Hubicka is the original author of this patch (from pretty-ipa I believe) and Richard brought it into mainline. Jan, can you comment on this bug and confirm that your change does indeed fix it?
Created attachment 23242 [details] This patch fixes the problem, but may be pessimistic.
Richard, check out the attached patch and let me know your thoughts.
I almost want to say LOOP_VINFO_NITERS should not have abnormal SSA's to begin with.
What happens is tree vectorization introduces code in the preheader to check for the loop iterations at runtime. The expression holding the number of iterations may contain ssa names that are abnormal. This may extend their live range (that is what happens in this testcase) and make them conflict with other abnormal names. That leads to an ICE. I wonder what the other passes do that hoist such code effectively extending the live ranges of abnormal ssa names.
(In reply to comment #5) > I almost want to say LOOP_VINFO_NITERS should not have abnormal SSA's to begin > with. Andrew, shouldn't it be fine to have abnormal SSAs as long as they don't conflict? That may be the best solution -- i.e. bailing out only if they will conflict later on, as opposed to what my patch does (it bails out as soon as an abnormal name is detected).
Ping. Andrew or Richard, how can I rework my patch to address this issue? Thanks,
4.3 branch is being closed, moving to 4.4.7 target.
Fixed in 4.5+, 4.4 is no longer supported.