xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/wide-fma-contraction.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma -mtriple=x86_64-apple-darwin < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma,-fma4 -mtriple=x86_64-apple-darwin < %s | FileCheck %s --check-prefix=CHECK-NOFMA
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fmafunc
5*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA-LABEL: fmafunc
6*9880d681SAndroid Build Coastguard Workerdefine <16 x float> @fmafunc(<16 x float> %a, <16 x float> %b, <16 x float> %c) {
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vmulps
9*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vaddps
10*9880d681SAndroid Build Coastguard Worker; CHECK: vfmaddps
11*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vmulps
12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vaddps
13*9880d681SAndroid Build Coastguard Worker; CHECK: vfmaddps
14*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vmulps
15*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vaddps
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA-NOT: calll
18*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA: vmulps
19*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA: vaddps
20*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA-NOT: calll
21*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA: vmulps
22*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA: vaddps
23*9880d681SAndroid Build Coastguard Worker; CHECK-NOFMA-NOT: calll
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker  %ret = tail call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %c)
26*9880d681SAndroid Build Coastguard Worker  ret <16 x float> %ret
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Workerdeclare <16 x float> @llvm.fmuladd.v16f32(<16 x float>, <16 x float>, <16 x float>) nounwind readnone
30