xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/fmaxnum.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdeclare float @fmaxf(float, float)
4*9880d681SAndroid Build Coastguard Workerdeclare double @fmax(double, double)
5*9880d681SAndroid Build Coastguard Workerdeclare ppc_fp128 @fmaxl(ppc_fp128, ppc_fp128)
6*9880d681SAndroid Build Coastguard Workerdeclare float @llvm.maxnum.f32(float, float)
7*9880d681SAndroid Build Coastguard Workerdeclare double @llvm.maxnum.f64(double, double)
8*9880d681SAndroid Build Coastguard Workerdeclare ppc_fp128 @llvm.maxnum.ppcf128(ppc_fp128, ppc_fp128)
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdeclare <2 x float> @llvm.maxnum.v2f32(<2 x float>, <2 x float>)
11*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>)
12*9880d681SAndroid Build Coastguard Workerdeclare <8 x float> @llvm.maxnum.v8f32(<8 x float>, <8 x float>)
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_fmaxf
15*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
16*9880d681SAndroid Build Coastguard Workerdefine float @test_fmaxf(float %x, float %y) {
17*9880d681SAndroid Build Coastguard Worker  %z = call float @fmaxf(float %x, float %y) readnone
18*9880d681SAndroid Build Coastguard Worker  ret float %z
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_fmax
22*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmax
23*9880d681SAndroid Build Coastguard Workerdefine double @test_fmax(double %x, double %y) {
24*9880d681SAndroid Build Coastguard Worker  %z = call double @fmax(double %x, double %y) readnone
25*9880d681SAndroid Build Coastguard Worker  ret double %z
26*9880d681SAndroid Build Coastguard Worker}
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_fmaxl
29*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxl
30*9880d681SAndroid Build Coastguard Workerdefine ppc_fp128 @test_fmaxl(ppc_fp128 %x, ppc_fp128 %y) {
31*9880d681SAndroid Build Coastguard Worker  %z = call ppc_fp128 @fmaxl(ppc_fp128 %x, ppc_fp128 %y) readnone
32*9880d681SAndroid Build Coastguard Worker  ret ppc_fp128 %z
33*9880d681SAndroid Build Coastguard Worker}
34*9880d681SAndroid Build Coastguard Worker
35*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmaxf
36*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
37*9880d681SAndroid Build Coastguard Workerdefine float @test_intrinsic_fmaxf(float %x, float %y) {
38*9880d681SAndroid Build Coastguard Worker  %z = call float @llvm.maxnum.f32(float %x, float %y) readnone
39*9880d681SAndroid Build Coastguard Worker  ret float %z
40*9880d681SAndroid Build Coastguard Worker}
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmax
43*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmax
44*9880d681SAndroid Build Coastguard Workerdefine double @test_intrinsic_fmax(double %x, double %y) {
45*9880d681SAndroid Build Coastguard Worker  %z = call double @llvm.maxnum.f64(double %x, double %y) readnone
46*9880d681SAndroid Build Coastguard Worker  ret double %z
47*9880d681SAndroid Build Coastguard Worker}
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmaxl
50*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxl
51*9880d681SAndroid Build Coastguard Workerdefine ppc_fp128 @test_intrinsic_fmaxl(ppc_fp128 %x, ppc_fp128 %y) {
52*9880d681SAndroid Build Coastguard Worker  %z = call ppc_fp128 @llvm.maxnum.ppcf128(ppc_fp128 %x, ppc_fp128 %y) readnone
53*9880d681SAndroid Build Coastguard Worker  ret ppc_fp128 %z
54*9880d681SAndroid Build Coastguard Worker}
55*9880d681SAndroid Build Coastguard Worker
56*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmaxf_v2f32
57*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
58*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
59*9880d681SAndroid Build Coastguard Workerdefine <2 x float> @test_intrinsic_fmaxf_v2f32(<2 x float> %x, <2 x float> %y) {
60*9880d681SAndroid Build Coastguard Worker  %z = call <2 x float> @llvm.maxnum.v2f32(<2 x float> %x, <2 x float> %y) readnone
61*9880d681SAndroid Build Coastguard Worker  ret <2 x float> %z
62*9880d681SAndroid Build Coastguard Worker}
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmaxf_v4f32
65*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
66*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
67*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
68*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
69*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test_intrinsic_fmaxf_v4f32(<4 x float> %x, <4 x float> %y) {
70*9880d681SAndroid Build Coastguard Worker  %z = call <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float> %y) readnone
71*9880d681SAndroid Build Coastguard Worker  ret <4 x float> %z
72*9880d681SAndroid Build Coastguard Worker}
73*9880d681SAndroid Build Coastguard Worker
74*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test_intrinsic_fmaxf_v8f32
75*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
76*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
77*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
78*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
79*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
80*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
81*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
82*9880d681SAndroid Build Coastguard Worker; CHECK: bl fmaxf
83*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @test_intrinsic_fmaxf_v8f32(<8 x float> %x, <8 x float> %y) {
84*9880d681SAndroid Build Coastguard Worker  %z = call <8 x float> @llvm.maxnum.v8f32(<8 x float> %x, <8 x float> %y) readnone
85*9880d681SAndroid Build Coastguard Worker  ret <8 x float> %z
86*9880d681SAndroid Build Coastguard Worker}
87