[llvm-commits] [PATCH] Instcombine: Don't optimize pow(2.0, x) -> exp2(x) if exp2 is unavailable

Eli Friedman eli.friedman at gmail.com
Mon Dec 10 17:28:52 PST 2012


On Tue, Nov 27, 2012 at 4:52 PM, Derek Schuff <dschuff at google.com> wrote:
> To solve the problem of modifying the implementation of library
> functions during LTO, here is one solution:
> don't modify the implementation of library functions. It's not
> normally necessary since LTO doesn't always include the C library, but
> it seems like a reasonable thing to do in any case. attached is a
> patch.

I don't think this is the right approach: if you're compiling code
from the standard library itself, any use of TargetLibraryInfo is
probably a bug, not just the one transform that happened to affect
your code.

-Eli



More information about the llvm-commits mailing list