blob: 858eabcb7dc6ca3f0459927970bb70e1e1527e36 [file] [log] [blame]
Stephen Lin4ee5e872013-07-09 19:27:10 +00001; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma -mtriple=x86_64-apple-darwin < %s | FileCheck %s
2; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma,-fma4 -mtriple=x86_64-apple-darwin < %s | FileCheck %s --check-prefix=CHECK-NOFMA
Stephen Lin73de7bf2013-07-09 18:16:56 +00003
Stephen Lin764d8d32013-07-12 14:54:12 +00004; CHECK-LABEL: fmafunc
Stephen Lin73de7bf2013-07-09 18:16:56 +00005define <3 x float> @fmafunc(<3 x float> %a, <3 x float> %b, <3 x float> %c) {
6
7; CHECK-NOT: vmulps
8; CHECK-NOT: vaddps
9; CHECK: vfmaddps
10; CHECK-NOT: vmulps
11; CHECK-NOT: vaddps
12
13; CHECK-NOFMA-NOT: calll
14; CHECK-NOFMA: vmulps
15; CHECK-NOFMA: vaddps
16; CHECK-NOFMA-NOT: calll
17
18 %ret = tail call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %a, <3 x float> %b, <3 x float> %c)
19 ret <3 x float> %ret
20}
21
22declare <3 x float> @llvm.fmuladd.v3f32(<3 x float>, <3 x float>, <3 x float>) nounwind readnone