[PATCH] CodeGen target hook for emitting intrinsic or libcall for pow*

Quentin Colombet qcolombet at apple.com
Fri Jun 28 09:47:59 PDT 2013


Hi Eli,

Just a thought, wouldn’t be better to add a hook in TargetSelectionDAGInfo for pow, just like memset and memmove?
Indeed, I guess that pow intrinsics may have special handling in some optimizations and I am afraid we lose those benefits with the proposed patch.

What do you think?

Cheers,

-Quentin

On Jun 27, 2013, at 3:57 PM, Eli Bendersky <eliben at google.com> wrote:

> Hello,
> 
> Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics when it sees pow*(). This may not be suitable for all targets (for example PNaCl), so the attached patch adds a target hook that CodeGen queries. The target can state its preference for having or not having the intrinsic generated. Non-PNaCl behavior remains unchanged; PNaCl-specific test added.
> 
> Please take a look,
> 
> Eli
> 
> <codegen-builtin-pow-le32.1.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130628/4e274614/attachment.html>


More information about the cfe-commits mailing list