https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21111
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Alexander Monakov from comment #18) > From my perspective, the main blocker for a nice and clean solution is lack > of "birth" statements on GIMPLE. They were not needed until now ;) > Without them, expansion to RTL would either need to insert initialization at > the top of the function (which is silly, extends lifetimes of pseudos that > only live in a small region, complicating RA), or compute something like a > lowest common dominator of all uses and place an initialization there. But > perhaps that's the right way if "birth statements" aren't happening? Yes, note that an explicit birth also affects SSA coalescing so they would need to be introduced before liveness computation or alternatively be inserted in possibly multiple places when the reg becomes live. > Or is there some other approach? Like not trying to insert a single > initialization, but instead substituting a zero in place of each use of the > default def individually? That would of course also work - use replace_uses_by to replace default defs with zero for modes that have a NaT (I don't think we have an existing way to check that though). But maybe one wants to preserve NaT trapping for uninit uses (though that would require active seeding of default defs with a NaT rather than with a non-NaT since otherwise the register content is just random and not a NaT).