1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm-eabihf -mattr=+neon < %s | FileCheck -check-prefixes=CHECK-NO_NEON %s
3 ; RUN: llc -mtriple=arm-eabihf -mattr=+neon,+neonfp < %s | FileCheck -check-prefixes=CHECK-NEON %s
5 define float @max_f32(float, float) {
6 ; CHECK-NO_NEON-LABEL: max_f32:
7 ; CHECK-NO_NEON: @ %bb.0:
8 ; CHECK-NO_NEON-NEXT: vcmp.f32 s1, s0
9 ; CHECK-NO_NEON-NEXT: vmrs APSR_nzcv, fpscr
10 ; CHECK-NO_NEON-NEXT: vmovgt.f32 s0, s1
11 ; CHECK-NO_NEON-NEXT: mov pc, lr
13 ; CHECK-NEON-LABEL: max_f32:
14 ; CHECK-NEON: @ %bb.0:
15 ; CHECK-NEON-NEXT: vcmp.f32 s1, s0
16 ; CHECK-NEON-NEXT: vmrs APSR_nzcv, fpscr
17 ; CHECK-NEON-NEXT: vmovgt.f32 s0, s1
18 ; CHECK-NEON-NEXT: mov pc, lr
19 %3 = call nnan float @llvm.maxnum.f32(float %1, float %0)
23 declare float @llvm.maxnum.f32(float, float) #1
25 define float @min_f32(float, float) {
26 ; CHECK-NO_NEON-LABEL: min_f32:
27 ; CHECK-NO_NEON: @ %bb.0:
28 ; CHECK-NO_NEON-NEXT: vcmp.f32 s1, s0
29 ; CHECK-NO_NEON-NEXT: vmrs APSR_nzcv, fpscr
30 ; CHECK-NO_NEON-NEXT: vmovlt.f32 s0, s1
31 ; CHECK-NO_NEON-NEXT: mov pc, lr
33 ; CHECK-NEON-LABEL: min_f32:
34 ; CHECK-NEON: @ %bb.0:
35 ; CHECK-NEON-NEXT: vcmp.f32 s1, s0
36 ; CHECK-NEON-NEXT: vmrs APSR_nzcv, fpscr
37 ; CHECK-NEON-NEXT: vmovlt.f32 s0, s1
38 ; CHECK-NEON-NEXT: mov pc, lr
39 %3 = call nnan float @llvm.minnum.f32(float %1, float %0)
43 declare float @llvm.minnum.f32(float, float) #1