Skip to content

Commit aa7e873

Browse files
committed
[AArch64] Regenerate fmin/fmax/memcpy legalization tests. NFC
1 parent 62213be commit aa7e873

File tree

3 files changed

+210
-169
lines changed

3 files changed

+210
-169
lines changed

llvm/test/CodeGen/AArch64/GlobalISel/legalize-fmaxnum.mir

Lines changed: 73 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ body: |
99
bb.0:
1010
liveins: $h0, $h1
1111
; FP16-LABEL: name: s16_legal_with_full_fp16
12-
; FP16: %a:_(s16) = COPY $h0
13-
; FP16: %b:_(s16) = COPY $h1
14-
; FP16: %maxnum:_(s16) = G_FMAXNUM %a, %b
15-
; FP16: $h0 = COPY %maxnum(s16)
16-
; FP16: RET_ReallyLR implicit $h0
12+
; FP16: liveins: $h0, $h1
13+
; FP16-NEXT: {{ $}}
14+
; FP16-NEXT: %a:_(s16) = COPY $h0
15+
; FP16-NEXT: %b:_(s16) = COPY $h1
16+
; FP16-NEXT: %maxnum:_(s16) = G_FMAXNUM %a, %b
17+
; FP16-NEXT: $h0 = COPY %maxnum(s16)
18+
; FP16-NEXT: RET_ReallyLR implicit $h0
19+
;
1720
; NO-FP16-LABEL: name: s16_legal_with_full_fp16
18-
; NO-FP16: %a:_(s16) = COPY $h0
19-
; NO-FP16: %b:_(s16) = COPY $h1
20-
; NO-FP16: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16)
21-
; NO-FP16: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16)
22-
; NO-FP16: [[FMAXNUM:%[0-9]+]]:_(s32) = G_FMAXNUM [[FPEXT]], [[FPEXT1]]
23-
; NO-FP16: %maxnum:_(s16) = G_FPTRUNC [[FMAXNUM]](s32)
24-
; NO-FP16: $h0 = COPY %maxnum(s16)
25-
; NO-FP16: RET_ReallyLR implicit $h0
21+
; NO-FP16: liveins: $h0, $h1
22+
; NO-FP16-NEXT: {{ $}}
23+
; NO-FP16-NEXT: %a:_(s16) = COPY $h0
24+
; NO-FP16-NEXT: %b:_(s16) = COPY $h1
25+
; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16)
26+
; NO-FP16-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16)
27+
; NO-FP16-NEXT: [[FMAXNUM:%[0-9]+]]:_(s32) = G_FMAXNUM [[FPEXT]], [[FPEXT1]]
28+
; NO-FP16-NEXT: %maxnum:_(s16) = G_FPTRUNC [[FMAXNUM]](s32)
29+
; NO-FP16-NEXT: $h0 = COPY %maxnum(s16)
30+
; NO-FP16-NEXT: RET_ReallyLR implicit $h0
2631
%a:_(s16) = COPY $h0
2732
%b:_(s16) = COPY $h1
2833
%maxnum:_(s16) = G_FMAXNUM %a, %b
@@ -37,17 +42,22 @@ body: |
3742
bb.0:
3843
liveins: $s0, $s1
3944
; FP16-LABEL: name: s32_legal
40-
; FP16: %a:_(s32) = COPY $s0
41-
; FP16: %b:_(s32) = COPY $s1
42-
; FP16: %maxnum:_(s32) = G_FMAXNUM %a, %b
43-
; FP16: $s0 = COPY %maxnum(s32)
44-
; FP16: RET_ReallyLR implicit $s0
45+
; FP16: liveins: $s0, $s1
46+
; FP16-NEXT: {{ $}}
47+
; FP16-NEXT: %a:_(s32) = COPY $s0
48+
; FP16-NEXT: %b:_(s32) = COPY $s1
49+
; FP16-NEXT: %maxnum:_(s32) = G_FMAXNUM %a, %b
50+
; FP16-NEXT: $s0 = COPY %maxnum(s32)
51+
; FP16-NEXT: RET_ReallyLR implicit $s0
52+
;
4553
; NO-FP16-LABEL: name: s32_legal
46-
; NO-FP16: %a:_(s32) = COPY $s0
47-
; NO-FP16: %b:_(s32) = COPY $s1
48-
; NO-FP16: %maxnum:_(s32) = G_FMAXNUM %a, %b
49-
; NO-FP16: $s0 = COPY %maxnum(s32)
50-
; NO-FP16: RET_ReallyLR implicit $s0
54+
; NO-FP16: liveins: $s0, $s1
55+
; NO-FP16-NEXT: {{ $}}
56+
; NO-FP16-NEXT: %a:_(s32) = COPY $s0
57+
; NO-FP16-NEXT: %b:_(s32) = COPY $s1
58+
; NO-FP16-NEXT: %maxnum:_(s32) = G_FMAXNUM %a, %b
59+
; NO-FP16-NEXT: $s0 = COPY %maxnum(s32)
60+
; NO-FP16-NEXT: RET_ReallyLR implicit $s0
5161
%a:_(s32) = COPY $s0
5262
%b:_(s32) = COPY $s1
5363
%maxnum:_(s32) = G_FMAXNUM %a, %b
@@ -62,17 +72,22 @@ body: |
6272
bb.0:
6373
liveins: $d0, $d1
6474
; FP16-LABEL: name: s64_legal
65-
; FP16: %a:_(s64) = COPY $d0
66-
; FP16: %b:_(s64) = COPY $d1
67-
; FP16: %maxnum:_(s64) = G_FMAXNUM %a, %b
68-
; FP16: $d0 = COPY %maxnum(s64)
69-
; FP16: RET_ReallyLR implicit $d0
75+
; FP16: liveins: $d0, $d1
76+
; FP16-NEXT: {{ $}}
77+
; FP16-NEXT: %a:_(s64) = COPY $d0
78+
; FP16-NEXT: %b:_(s64) = COPY $d1
79+
; FP16-NEXT: %maxnum:_(s64) = G_FMAXNUM %a, %b
80+
; FP16-NEXT: $d0 = COPY %maxnum(s64)
81+
; FP16-NEXT: RET_ReallyLR implicit $d0
82+
;
7083
; NO-FP16-LABEL: name: s64_legal
71-
; NO-FP16: %a:_(s64) = COPY $d0
72-
; NO-FP16: %b:_(s64) = COPY $d1
73-
; NO-FP16: %maxnum:_(s64) = G_FMAXNUM %a, %b
74-
; NO-FP16: $d0 = COPY %maxnum(s64)
75-
; NO-FP16: RET_ReallyLR implicit $d0
84+
; NO-FP16: liveins: $d0, $d1
85+
; NO-FP16-NEXT: {{ $}}
86+
; NO-FP16-NEXT: %a:_(s64) = COPY $d0
87+
; NO-FP16-NEXT: %b:_(s64) = COPY $d1
88+
; NO-FP16-NEXT: %maxnum:_(s64) = G_FMAXNUM %a, %b
89+
; NO-FP16-NEXT: $d0 = COPY %maxnum(s64)
90+
; NO-FP16-NEXT: RET_ReallyLR implicit $d0
7691
%a:_(s64) = COPY $d0
7792
%b:_(s64) = COPY $d1
7893
%maxnum:_(s64) = G_FMAXNUM %a, %b
@@ -87,27 +102,32 @@ body: |
87102
bb.0:
88103
liveins: $q0, $q1
89104
; FP16-LABEL: name: s128_libcall
90-
; FP16: %a:_(s128) = COPY $q0
91-
; FP16: %b:_(s128) = COPY $q1
92-
; FP16: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
93-
; FP16: $q0 = COPY %a(s128)
94-
; FP16: $q1 = COPY %b(s128)
95-
; FP16: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
96-
; FP16: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
97-
; FP16: %maxnum:_(s128) = COPY $q0
98-
; FP16: $q0 = COPY %maxnum(s128)
99-
; FP16: RET_ReallyLR implicit $q0
105+
; FP16: liveins: $q0, $q1
106+
; FP16-NEXT: {{ $}}
107+
; FP16-NEXT: %a:_(s128) = COPY $q0
108+
; FP16-NEXT: %b:_(s128) = COPY $q1
109+
; FP16-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
110+
; FP16-NEXT: $q0 = COPY %a(s128)
111+
; FP16-NEXT: $q1 = COPY %b(s128)
112+
; FP16-NEXT: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
113+
; FP16-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
114+
; FP16-NEXT: %maxnum:_(s128) = COPY $q0
115+
; FP16-NEXT: $q0 = COPY %maxnum(s128)
116+
; FP16-NEXT: RET_ReallyLR implicit $q0
117+
;
100118
; NO-FP16-LABEL: name: s128_libcall
101-
; NO-FP16: %a:_(s128) = COPY $q0
102-
; NO-FP16: %b:_(s128) = COPY $q1
103-
; NO-FP16: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
104-
; NO-FP16: $q0 = COPY %a(s128)
105-
; NO-FP16: $q1 = COPY %b(s128)
106-
; NO-FP16: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
107-
; NO-FP16: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
108-
; NO-FP16: %maxnum:_(s128) = COPY $q0
109-
; NO-FP16: $q0 = COPY %maxnum(s128)
110-
; NO-FP16: RET_ReallyLR implicit $q0
119+
; NO-FP16: liveins: $q0, $q1
120+
; NO-FP16-NEXT: {{ $}}
121+
; NO-FP16-NEXT: %a:_(s128) = COPY $q0
122+
; NO-FP16-NEXT: %b:_(s128) = COPY $q1
123+
; NO-FP16-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
124+
; NO-FP16-NEXT: $q0 = COPY %a(s128)
125+
; NO-FP16-NEXT: $q1 = COPY %b(s128)
126+
; NO-FP16-NEXT: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
127+
; NO-FP16-NEXT: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
128+
; NO-FP16-NEXT: %maxnum:_(s128) = COPY $q0
129+
; NO-FP16-NEXT: $q0 = COPY %maxnum(s128)
130+
; NO-FP16-NEXT: RET_ReallyLR implicit $q0
111131
%a:_(s128) = COPY $q0
112132
%b:_(s128) = COPY $q1
113133
%maxnum:_(s128) = G_FMAXNUM %a, %b

llvm/test/CodeGen/AArch64/GlobalISel/legalize-fminnum.mir

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ alignment: 4
130130
body: |
131131
bb.1.entry:
132132
liveins: $q0, $q1
133+
; CHECK-LABEL: name: v3s32_widen
134+
; CHECK: liveins: $q0, $q1
135+
; CHECK-NEXT: {{ $}}
136+
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
137+
; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY]](<2 x s64>)
138+
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $q1
139+
; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<4 x s32>) = G_BITCAST [[COPY1]](<2 x s64>)
140+
; CHECK-NEXT: [[FMINNUM:%[0-9]+]]:_(<4 x s32>) = G_FMINNUM [[BITCAST]], [[BITCAST1]]
141+
; CHECK-NEXT: $q0 = COPY [[FMINNUM]](<4 x s32>)
142+
; CHECK-NEXT: RET_ReallyLR implicit $q0
133143
%2:_(<2 x s64>) = COPY $q0
134144
%3:_(<4 x s32>) = G_BITCAST %2:_(<2 x s64>)
135145
%4:_(s32), %5:_(s32), %6:_(s32), %7:_(s32) = G_UNMERGE_VALUES %3:_(<4 x s32>)

0 commit comments

Comments
 (0)