Stream: t-compiler/wg-llvm

Topic: misoptimization


simulacrum (Dec 24 2019 at 00:12, on Zulip):

Do we have a process for filing upstream LLVM bugs? I've translated this Rust to this C. In either case, I expect that the please_delete function is not called, as it's statically obvious that that branch cannot be reached. GCC successfully removes the call (compiling bar to ret).

simulacrum (Dec 24 2019 at 01:20, on Zulip):

Interestingly, if the len_utf8 function is marked as inline(never) the problem disappears

simulacrum (Dec 24 2019 at 01:21, on Zulip):

which is.. not intuitive

rkruppe (Dec 24 2019 at 08:35, on Zulip):

To be clear, the problem here is that an optimization which would be correct and desirable does not happen? I ask because "misoptimization" (like "miscompile") usually refers to an optimization being incorrect, changing the behavior of the program.

centril (Dec 24 2019 at 15:52, on Zulip):

@rkruppe yep, not a case of miscompilation here

pnkfelix (Jan 02 2020 at 19:35, on Zulip):

maybe better topic title would be "missed optimization" ?

Last update: Jul 02 2020 at 20:00UTC