[Bug tree-optimization/85971] Really Simple "If" with one function call inside is not optimized efficiently
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 30 10:53:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85971
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> I think this is actually two different bugs.
> One where cstore is not working when there is a function call inbetween.
> If I add an argument to CreateChecksum and change the first PolyMod to + t
> and the second PolyMod to * t. the cstore optimization work. This is
> recorded now as PR 85987.
>
> The second one is the lowering of common function calls with slightly
> different arguments. I thought I saw one asking for this one but I can't
> find it.
Related would be transforming
if (x)
foo (a,b,c);
else
bar (a,b,c);
to
fn = x ? foo : bar;
(*fn) (a,b,c);
(or the reverse?) which might be profitable when optimizing for size
or even when optimizing branch predictor vs. indirect branch/call
predictor usage.
More information about the Gcc-bugs
mailing list