1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=bdver2 -mattr=-fma -mtriple=i686-apple-darwin < %s | FileCheck %s
3 ; RUN: llc -mcpu=bdver2 -mattr=-fma,-fma4 -mtriple=i686-apple-darwin < %s | FileCheck %s --check-prefix=CHECK-NOFMA
6 ; CHECK-NOFMA-LABEL: fmafunc
7 define <16 x float> @fmafunc(<16 x float> %a, <16 x float> %b, <16 x float> %c) {
8 ; CHECK-LABEL: fmafunc:
10 ; CHECK-NEXT: pushl %ebp
11 ; CHECK-NEXT: .cfi_def_cfa_offset 8
12 ; CHECK-NEXT: .cfi_offset %ebp, -8
13 ; CHECK-NEXT: movl %esp, %ebp
14 ; CHECK-NEXT: .cfi_def_cfa_register %ebp
15 ; CHECK-NEXT: andl $-32, %esp
16 ; CHECK-NEXT: subl $32, %esp
17 ; CHECK-NEXT: vfmaddps 8(%ebp), %ymm2, %ymm0, %ymm0
18 ; CHECK-NEXT: vfmaddps 40(%ebp), %ymm3, %ymm1, %ymm1
19 ; CHECK-NEXT: movl %ebp, %esp
20 ; CHECK-NEXT: popl %ebp
23 ; CHECK-NOFMA-LABEL: fmafunc:
24 ; CHECK-NOFMA: ## %bb.0:
25 ; CHECK-NOFMA-NEXT: pushl %ebp
26 ; CHECK-NOFMA-NEXT: .cfi_def_cfa_offset 8
27 ; CHECK-NOFMA-NEXT: .cfi_offset %ebp, -8
28 ; CHECK-NOFMA-NEXT: movl %esp, %ebp
29 ; CHECK-NOFMA-NEXT: .cfi_def_cfa_register %ebp
30 ; CHECK-NOFMA-NEXT: andl $-32, %esp
31 ; CHECK-NOFMA-NEXT: subl $32, %esp
32 ; CHECK-NOFMA-NEXT: vmulps %ymm2, %ymm0, %ymm0
33 ; CHECK-NOFMA-NEXT: vmulps %ymm3, %ymm1, %ymm1
34 ; CHECK-NOFMA-NEXT: vaddps 8(%ebp), %ymm0, %ymm0
35 ; CHECK-NOFMA-NEXT: vaddps 40(%ebp), %ymm1, %ymm1
36 ; CHECK-NOFMA-NEXT: movl %ebp, %esp
37 ; CHECK-NOFMA-NEXT: popl %ebp
38 ; CHECK-NOFMA-NEXT: retl
41 %ret = tail call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %c)
45 declare <16 x float> @llvm.fmuladd.v16f32(<16 x float>, <16 x float>, <16 x float>) nounwind readnone