On Thu, Mar 14, 2024 at 09:48:45AM +0100, Richard Biener wrote: > Ugh. OK, but I wonder whether we might want to simply delay > fixing the CFG for inserts before returns-twice? Would that make > things less ugly?
You mean in lower_call just remember if we added anything before ECF_RETURNS_TWICE call (or say add such stmt into a vector) and then fix it up before the end of the pass? I can certainly try that and see what is shorter/more maintainable. Jakub