xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/fmuls.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \
2*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=VFP2
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \
5*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=NFP0
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \
8*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=CORTEXA8
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \
11*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=CORTEXA8U
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \
14*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=CORTEXA8U
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - \
17*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck %s -check-prefix=CORTEXA9
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Workerdefine float @test(float %a, float %b) {
20*9880d681SAndroid Build Coastguard Workerentry:
21*9880d681SAndroid Build Coastguard Worker	%0 = fmul float %a, %b
22*9880d681SAndroid Build Coastguard Worker	ret float %0
23*9880d681SAndroid Build Coastguard Worker}
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker; VFP2-LABEL: test:
26*9880d681SAndroid Build Coastguard Worker; VFP2: 	vmul.f32	s
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker; NFP1-LABEL: test:
29*9880d681SAndroid Build Coastguard Worker; NFP1: 	vmul.f32	d
30*9880d681SAndroid Build Coastguard Worker; NFP0-LABEL: test:
31*9880d681SAndroid Build Coastguard Worker; NFP0: 	vmul.f32	s
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker; CORTEXA8-LABEL: test:
34*9880d681SAndroid Build Coastguard Worker; CORTEXA8: 	vmul.f32	s
35*9880d681SAndroid Build Coastguard Worker; CORTEXA8U-LABEL: test:
36*9880d681SAndroid Build Coastguard Worker; CORTEXA8U: 	vmul.f32	d
37*9880d681SAndroid Build Coastguard Worker; CORTEXA9-LABEL: test:
38*9880d681SAndroid Build Coastguard Worker; CORTEXA9: 	vmul.f32	s
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard Worker; VFP2: test2
41*9880d681SAndroid Build Coastguard Workerdefine float @test2(float %a) nounwind {
42*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: mul
43*9880d681SAndroid Build Coastguard Worker; CHECK: mov pc, lr
44*9880d681SAndroid Build Coastguard Worker  %ret = fmul float %a, 1.0
45*9880d681SAndroid Build Coastguard Worker  ret float %ret
46*9880d681SAndroid Build Coastguard Worker}
47*9880d681SAndroid Build Coastguard Worker
48