[LLVMdev] X86 rsqrt instruction generated

Eli Friedman eli.friedman at gmail.com
Tue Dec 18 14:56:16 PST 2012


On Mon, Dec 3, 2012 at 1:16 AM, Chakraborty, Soham
<Soham.Chakraborty at amd.com> wrote:
> Hi,
>
> Please find attached the modified patch and description. We have modified and retested the patch taking into consideration  the comments and inputs provided earlier.

This is much closer to an acceptable patch.

You still haven't addressed my concern about using the fpmath metadata
(http://llvm.org/docs/LangRef.html#fpmath-metadata) to drive this
instead of a command-line option.

The special-case for 1.0/sqrt(x) (as opposed to y/sqrt(x)) appears to
be unnecessary.  Also, I'm a bit concerned that if the DAGCombine
visits the FSQRT before the FDIV, we'll end up with weird sequences
like 1.0/(x*rsqrt(x)).

The indentation of the code appears weird in a few places.

Please include regression tests.

-Eli



More information about the llvm-dev mailing list