[LLVMbugs] [Bug 17188] New: x86 FMA not generated unless fast-math is used?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 10 15:35:31 PDT 2013


            Bug ID: 17188
           Summary: x86 FMA not generated unless fast-math is used?
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: kkhoo at perfwizard.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I was expecting a target that has the FMA feature to use FMA instructions with
-O3 (or even less), but:

$ ./clang -v
clang version 3.4 (trunk 189776)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

$ cat fma.c 
double foo(double x) {
    return x*x + x;

$ ./clang -S -O3 -fomit-frame-pointer -march=core-avx2 -o /dev/stdout fma.c 
    .section    __TEXT,__text,regular,pure_instructions
    .globl    _foo
    .align    4, 0x90
_foo:                                   ## @foo
## BB#0:                                ## %entry
    vmulsd    %xmm0, %xmm0, %xmm1
    vaddsd    %xmm0, %xmm1, %xmm0

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130910/abc1c91c/attachment.html>

More information about the llvm-bugs mailing list