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

Derek Schuff dschuff at google.com
Tue Nov 27 16:20:10 PST 2012


OK, thanks for the feedback.
Attached is a patch which fixes the problem of emitting the pow
optimizations on platforms which lack exp2 et al, along with tests.
The optimizations which are added via addOpt are properly guarded, so
mostly just the pow and exp2 opts needed work. A patch for my specific
problem is forthcoming.

On Mon, Nov 26, 2012 at 6:18 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Nov 26, 2012 at 3:33 PM, Derek Schuff <dschuff at google.com> wrote:
>> On Mon, Nov 26, 2012 at 1:02 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> On Mon, Nov 26, 2012 at 11:17 AM, Derek Schuff <dschuff at google.com> wrote:
>>> The patch is fine, as far as it goes.  There are a bunch of related
>>> issues here, if you're interested in trying to address them.
>> What did you have in mind?
>> As long as I'm in this code, I don't mind fixing some things, as long
>> as the rabbit hole's not *too* deep :)
>
> Every other call to EmitUnaryFloatFnCall is broken in the same way.
>
> -Eli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Libcalls3.diff
Type: application/octet-stream
Size: 7522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121127/fb5184c8/attachment.obj>


More information about the llvm-commits mailing list