1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=FP16
3 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=NO-FP16
6 name: s16_legal_with_full_fp16
11 ; FP16-LABEL: name: s16_legal_with_full_fp16
12 ; FP16: liveins: $h0, $h1
14 ; FP16-NEXT: %a:_(s16) = COPY $h0
15 ; FP16-NEXT: %b:_(s16) = COPY $h1
16 ; FP16-NEXT: %legalize_me:_(s16) = G_FMAXIMUM %a, %b
17 ; FP16-NEXT: $h0 = COPY %legalize_me(s16)
18 ; FP16-NEXT: RET_ReallyLR implicit $h0
19 ; NO-FP16-LABEL: name: s16_legal_with_full_fp16
20 ; NO-FP16: liveins: $h0, $h1
21 ; NO-FP16-NEXT: {{ $}}
22 ; NO-FP16-NEXT: %a:_(s16) = COPY $h0
23 ; NO-FP16-NEXT: %b:_(s16) = COPY $h1
24 ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16)
25 ; NO-FP16-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16)
26 ; NO-FP16-NEXT: [[FMAXIMUM:%[0-9]+]]:_(s32) = G_FMAXIMUM [[FPEXT]], [[FPEXT1]]
27 ; NO-FP16-NEXT: %legalize_me:_(s16) = G_FPTRUNC [[FMAXIMUM]](s32)
28 ; NO-FP16-NEXT: $h0 = COPY %legalize_me(s16)
29 ; NO-FP16-NEXT: RET_ReallyLR implicit $h0
32 %legalize_me:_(s16) = G_FMAXIMUM %a, %b
33 $h0 = COPY %legalize_me(s16)
34 RET_ReallyLR implicit $h0
43 ; FP16-LABEL: name: s32_legal
44 ; FP16: liveins: $s0, $s1
46 ; FP16-NEXT: %a:_(s32) = COPY $s0
47 ; FP16-NEXT: %b:_(s32) = COPY $s1
48 ; FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b
49 ; FP16-NEXT: $s0 = COPY %legalize_me(s32)
50 ; FP16-NEXT: RET_ReallyLR implicit $s0
51 ; NO-FP16-LABEL: name: s32_legal
52 ; NO-FP16: liveins: $s0, $s1
53 ; NO-FP16-NEXT: {{ $}}
54 ; NO-FP16-NEXT: %a:_(s32) = COPY $s0
55 ; NO-FP16-NEXT: %b:_(s32) = COPY $s1
56 ; NO-FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b
57 ; NO-FP16-NEXT: $s0 = COPY %legalize_me(s32)
58 ; NO-FP16-NEXT: RET_ReallyLR implicit $s0
61 %legalize_me:_(s32) = G_FMAXIMUM %a, %b
62 $s0 = COPY %legalize_me(s32)
63 RET_ReallyLR implicit $s0
72 ; FP16-LABEL: name: s64_legal
73 ; FP16: liveins: $d0, $d1
75 ; FP16-NEXT: %a:_(s64) = COPY $d0
76 ; FP16-NEXT: %b:_(s64) = COPY $d1
77 ; FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b
78 ; FP16-NEXT: $d0 = COPY %legalize_me(s64)
79 ; FP16-NEXT: RET_ReallyLR implicit $d0
80 ; NO-FP16-LABEL: name: s64_legal
81 ; NO-FP16: liveins: $d0, $d1
82 ; NO-FP16-NEXT: {{ $}}
83 ; NO-FP16-NEXT: %a:_(s64) = COPY $d0
84 ; NO-FP16-NEXT: %b:_(s64) = COPY $d1
85 ; NO-FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b
86 ; NO-FP16-NEXT: $d0 = COPY %legalize_me(s64)
87 ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
90 %legalize_me:_(s64) = G_FMAXIMUM %a, %b
91 $d0 = COPY %legalize_me(s64)
92 RET_ReallyLR implicit $d0
100 ; FP16-LABEL: name: v2s32
101 ; FP16: liveins: $d0, $d1
103 ; FP16-NEXT: %a:_(<2 x s32>) = COPY $d0
104 ; FP16-NEXT: %b:_(<2 x s32>) = COPY $d1
105 ; FP16-NEXT: %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
106 ; FP16-NEXT: $d0 = COPY %maximum(<2 x s32>)
107 ; FP16-NEXT: RET_ReallyLR implicit $d0
108 ; NO-FP16-LABEL: name: v2s32
109 ; NO-FP16: liveins: $d0, $d1
110 ; NO-FP16-NEXT: {{ $}}
111 ; NO-FP16-NEXT: %a:_(<2 x s32>) = COPY $d0
112 ; NO-FP16-NEXT: %b:_(<2 x s32>) = COPY $d1
113 ; NO-FP16-NEXT: %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
114 ; NO-FP16-NEXT: $d0 = COPY %maximum(<2 x s32>)
115 ; NO-FP16-NEXT: RET_ReallyLR implicit $d0
116 %a:_(<2 x s32>) = COPY $d0
117 %b:_(<2 x s32>) = COPY $d1
118 %maximum:_(<2 x s32>) = G_FMAXIMUM %a, %b
119 $d0 = COPY %maximum(<2 x s32>)
120 RET_ReallyLR implicit $d0
129 ; FP16-LABEL: name: v4s32
130 ; FP16: liveins: $q0, $q1
132 ; FP16-NEXT: %a:_(<4 x s32>) = COPY $q0
133 ; FP16-NEXT: %b:_(<4 x s32>) = COPY $q1
134 ; FP16-NEXT: %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
135 ; FP16-NEXT: $q0 = COPY %maximum(<4 x s32>)
136 ; FP16-NEXT: RET_ReallyLR implicit $q0
137 ; NO-FP16-LABEL: name: v4s32
138 ; NO-FP16: liveins: $q0, $q1
139 ; NO-FP16-NEXT: {{ $}}
140 ; NO-FP16-NEXT: %a:_(<4 x s32>) = COPY $q0
141 ; NO-FP16-NEXT: %b:_(<4 x s32>) = COPY $q1
142 ; NO-FP16-NEXT: %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
143 ; NO-FP16-NEXT: $q0 = COPY %maximum(<4 x s32>)
144 ; NO-FP16-NEXT: RET_ReallyLR implicit $q0
145 %a:_(<4 x s32>) = COPY $q0
146 %b:_(<4 x s32>) = COPY $q1
147 %maximum:_(<4 x s32>) = G_FMAXIMUM %a, %b
148 $q0 = COPY %maximum(<4 x s32>)
149 RET_ReallyLR implicit $q0