1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple=aarch64-- -verify-machineinstrs -global-isel -stop-after=irtranslator -o - %s | FileCheck %s
4 define float @test_minnum(float %x, float %y) {
5 ; CHECK-LABEL: name: test_minnum
6 ; CHECK: bb.1 (%ir-block.0):
7 ; CHECK: liveins: $s0, $s1
8 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
9 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
10 ; CHECK: [[FMINNUM:%[0-9]+]]:_(s32) = G_FMINNUM [[COPY]], [[COPY1]]
11 ; CHECK: $s0 = COPY [[FMINNUM]](s32)
12 ; CHECK: RET_ReallyLR implicit $s0
13 %val = call float @llvm.minnum.f32(float %x, float %y)
17 define float @test_minnum_nnan(float %x, float %y) {
18 ; CHECK-LABEL: name: test_minnum_nnan
19 ; CHECK: bb.1 (%ir-block.0):
20 ; CHECK: liveins: $s0, $s1
21 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
22 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
23 ; CHECK: %2:_(s32) = nnan G_FMINNUM [[COPY]], [[COPY1]]
24 ; CHECK: $s0 = COPY %2(s32)
25 ; CHECK: RET_ReallyLR implicit $s0
26 %val = call nnan float @llvm.minnum.f32(float %x, float %y)
30 define float @test_maxnum(float %x, float %y) {
31 ; CHECK-LABEL: name: test_maxnum
32 ; CHECK: bb.1 (%ir-block.0):
33 ; CHECK: liveins: $s0, $s1
34 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
35 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
36 ; CHECK: [[FMAXNUM:%[0-9]+]]:_(s32) = G_FMAXNUM [[COPY]], [[COPY1]]
37 ; CHECK: $s0 = COPY [[FMAXNUM]](s32)
38 ; CHECK: RET_ReallyLR implicit $s0
39 %val = call float @llvm.maxnum.f32(float %x, float %y)
43 define float @test_minimum(float %x, float %y) {
44 ; CHECK-LABEL: name: test_minimum
45 ; CHECK: bb.1 (%ir-block.0):
46 ; CHECK: liveins: $s0, $s1
47 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
48 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
49 ; CHECK: [[FMINIMUM:%[0-9]+]]:_(s32) = G_FMINIMUM [[COPY]], [[COPY1]]
50 ; CHECK: $s0 = COPY [[FMINIMUM]](s32)
51 ; CHECK: RET_ReallyLR implicit $s0
52 %val = call float @llvm.minimum.f32(float %x, float %y)
56 define float @test_minimum_nnan(float %x, float %y) {
57 ; CHECK-LABEL: name: test_minimum_nnan
58 ; CHECK: bb.1 (%ir-block.0):
59 ; CHECK: liveins: $s0, $s1
60 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
61 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
62 ; CHECK: %2:_(s32) = nnan G_FMINIMUM [[COPY]], [[COPY1]]
63 ; CHECK: $s0 = COPY %2(s32)
64 ; CHECK: RET_ReallyLR implicit $s0
65 %val = call nnan float @llvm.minimum.f32(float %x, float %y)
69 define float @test_maximum(float %x, float %y) {
70 ; CHECK-LABEL: name: test_maximum
71 ; CHECK: bb.1 (%ir-block.0):
72 ; CHECK: liveins: $s0, $s1
73 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $s0
74 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
75 ; CHECK: [[FMAXIMUM:%[0-9]+]]:_(s32) = G_FMAXIMUM [[COPY]], [[COPY1]]
76 ; CHECK: $s0 = COPY [[FMAXIMUM]](s32)
77 ; CHECK: RET_ReallyLR implicit $s0
78 %val = call float @llvm.maximum.f32(float %x, float %y)
82 declare float @llvm.minnum.f32(float, float) #0
83 declare float @llvm.maxnum.f32(float, float) #0
85 declare float @llvm.minimum.f32(float, float) #0
86 declare float @llvm.maximum.f32(float, float) #0
88 attributes #0 = { nounwind readnone speculatable }