https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102783
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Even out-of-line does not help if there are visible CSE/association opportunities across such call. A workaround is to make the out-of-line function __attribute__((returns_twice)) which should insert artificial control flow preventing such transforms.