[Bug tree-optimization/100858] Simple common code hoisting is not performed
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 2 08:01:47 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100858
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-06-02
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
That's really a duplicate of 100858 - this case can be handled by sinking as
well
since we "sink" the return. Make it
void bar();
int foo(bool f)
{
if (f) {
bar();
__builtin_abort ();
}
else {
bar();
return 2;
}
}
to force hoisting. Hoisting is done by PRE but that requires a LHS and
doesn't handle calls with side-effects.
More information about the Gcc-bugs
mailing list