[LLVMbugs] [Bug 17211] New: FMA not generated with -ffp-contract=on
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 12 08:46:12 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17211
Bug ID: 17211
Summary: FMA not generated with -ffp-contract=on
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: kkhoo at perfwizard.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
With the following code, I expected to see a "vfmadd*" instruction generated.
I'm not sure what functional differences are enabled by the fp-contract
parameter. It appears to accept "off", "on", and "fast". If I use "fast", I get
the expected codegen.
$ ./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 -ffp-contract=on -march=core-avx2 -o /dev/stdout fma.c
.section __TEXT,__text,regular,pure_instructions
.globl _foo
.align 4, 0x90
_foo: ## @foo
.cfi_startproc
## BB#0: ## %entry
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
vmulsd %xmm0, %xmm0, %xmm1
vaddsd %xmm0, %xmm1, %xmm0
popq %rbp
ret
.cfi_endproc
--
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/20130912/e1749663/attachment.html>
More information about the llvm-bugs
mailing list