[PATCH] Fix pow simplification when fabs and sqrt are unavailable

Kuperstein, Michael M michael.m.kuperstein at intel.com
Thu Aug 15 06:20:59 PDT 2013


Whoops, previous patch is bad.
Attached is a hopefully saner one.

(Also adds a missing check for pow(2.0, x) -> exp2(x) *correctly*, that's unrelated to the ldexp issue.)

From: Kuperstein, Michael M
Sent: Thursday, August 15, 2013 16:10
To: llvm-commits at cs.uiuc.edu
Subject: [PATCH] Fix pow simplification when fabs and sqrt are unavailable

Hi,

This adds a missing TLI check for the pow(x, 0.5) -> fabs(sqrt(x)) simplification.

There's a similar problem with exp2, but I don't see a LibFunc::ldexp I can check for.
Anyone has any idea if it's missing on purpose, or just an omission?

Michael
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130815/32ef6c12/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powtli2.diff
Type: application/octet-stream
Size: 3028 bytes
Desc: powtli2.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130815/32ef6c12/attachment.obj>


More information about the llvm-commits mailing list