Skip to content

Commit 5830afa

Browse files
author
Jessica Paquette
committed
[GlobalISel] NFC: Regen some tests + improve test coverage for wide even types
It turns out we don't do an awesome job with weird types like s318 (and other types near them, like s316). We don't have any test coverage for those types, so let's add some so it's easier to see the impact of legalization improvements on them when we make changes. Since the test generator was changed, it's easier to update relevant tests prior to changing things rather than squinting at a bunch of "ah, CHECK is now CHECK-NEXT" lines. So, let's just regenerate a bunch of tests while we're here. Unfortunately the "CHECK-NEXT" scheme doesn't work with legalize-cmp for some reason, and the test will fail. So keep that one having CHECK lines.
1 parent 09f33a4 commit 5830afa

File tree

7 files changed

+652
-281
lines changed

7 files changed

+652
-281
lines changed

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

Lines changed: 85 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ body: |
66
bb.0.entry:
77
; CHECK-LABEL: name: test_scalar_and_small
88
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
9-
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
10-
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
11-
; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
12-
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[TRUNC1]]
13-
; CHECK: $w0 = COPY [[AND]](s32)
14-
; CHECK: $x0 = COPY [[COPY]](s64)
9+
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
10+
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
11+
; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
12+
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[TRUNC]], [[TRUNC1]]
13+
; CHECK-NEXT: $w0 = COPY [[AND]](s32)
14+
; CHECK-NEXT: $x0 = COPY [[COPY]](s64)
1515
%0:_(s64) = COPY $x0
1616
%1:_(s64) = COPY $x1
1717
%2:_(s8) = G_TRUNC %0(s64)
@@ -29,44 +29,88 @@ body: |
2929
bb.0.entry:
3030
; CHECK-LABEL: name: test_nonpow2
3131
; CHECK: %ptr:_(p0) = COPY $x0
32-
; CHECK: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
33-
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
34-
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
35-
; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
36-
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
37-
; CHECK: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16) from unknown-address + 8, align 8)
38-
; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
39-
; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s64)
40-
; CHECK: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
41-
; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
42-
; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
43-
; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
44-
; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
45-
; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[ZEXTLOAD]]
46-
; CHECK: [[OR1:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD]]
47-
; CHECK: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR]], [[C]]
48-
; CHECK: [[LOAD2:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
49-
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
50-
; CHECK: [[ZEXTLOAD1:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY1]](p0) :: (load (s16) from unknown-address + 8, align 8)
51-
; CHECK: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C2]](s64)
52-
; CHECK: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p0) :: (load (s8) from unknown-address + 10, align 2)
53-
; CHECK: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD3]](s32), [[DEF]](s32)
54-
; CHECK: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[MV1]], [[C3]](s64)
55-
; CHECK: [[OR3:%[0-9]+]]:_(s64) = G_OR [[SHL1]], [[ZEXTLOAD1]]
56-
; CHECK: [[OR4:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD2]]
57-
; CHECK: [[OR5:%[0-9]+]]:_(s64) = G_OR [[OR3]], [[C]]
58-
; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[OR1]], [[OR4]]
59-
; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[OR2]], [[OR5]]
60-
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY [[AND]](s64)
61-
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[AND1]](s64)
62-
; CHECK: G_STORE [[COPY2]](s64), %ptr(p0) :: (store (s64), align 16)
63-
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[TRUNC]], [[C3]](s64)
64-
; CHECK: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
65-
; CHECK: G_STORE [[TRUNC]](s32), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 8, align 8)
66-
; CHECK: G_STORE [[LSHR]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
32+
; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
33+
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
34+
; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
35+
; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
36+
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
37+
; CHECK-NEXT: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16) from unknown-address + 8, align 8)
38+
; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
39+
; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s64)
40+
; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
41+
; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
42+
; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
43+
; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
44+
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
45+
; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[SHL]], [[ZEXTLOAD]]
46+
; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD]]
47+
; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR]], [[C]]
48+
; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
49+
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
50+
; CHECK-NEXT: [[ZEXTLOAD1:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY1]](p0) :: (load (s16) from unknown-address + 8, align 8)
51+
; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C2]](s64)
52+
; CHECK-NEXT: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p0) :: (load (s8) from unknown-address + 10, align 2)
53+
; CHECK-NEXT: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD3]](s32), [[DEF]](s32)
54+
; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[MV1]], [[C3]](s64)
55+
; CHECK-NEXT: [[OR3:%[0-9]+]]:_(s64) = G_OR [[SHL1]], [[ZEXTLOAD1]]
56+
; CHECK-NEXT: [[OR4:%[0-9]+]]:_(s64) = G_OR [[C]], [[LOAD2]]
57+
; CHECK-NEXT: [[OR5:%[0-9]+]]:_(s64) = G_OR [[OR3]], [[C]]
58+
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[OR1]], [[OR4]]
59+
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[OR2]], [[OR5]]
60+
; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY [[AND]](s64)
61+
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[AND1]](s64)
62+
; CHECK-NEXT: G_STORE [[COPY2]](s64), %ptr(p0) :: (store (s64), align 16)
63+
; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[TRUNC]], [[C3]](s64)
64+
; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
65+
; CHECK-NEXT: G_STORE [[TRUNC]](s32), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 8, align 8)
66+
; CHECK-NEXT: G_STORE [[LSHR]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
6767
%ptr:_(p0) = COPY $x0
6868
%a:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
6969
%b:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
7070
%and:_(s88) = G_AND %a, %b
7171
G_STORE %and(s88), %ptr(p0) :: (store (s88))
7272
...
73+
---
74+
name: test_s318_and
75+
tracksRegLiveness: true
76+
body: |
77+
bb.0:
78+
liveins: $x0
79+
80+
; CHECK-LABEL: name: test_s318_and
81+
; CHECK: liveins: $x0
82+
; CHECK-NEXT: {{ $}}
83+
; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
84+
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
85+
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[DEF]]
86+
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[DEF]]
87+
; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[DEF]]
88+
; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[DEF]]
89+
; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[DEF]]
90+
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
91+
; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4611686018427387903
92+
; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s64) = G_AND [[AND]], [[C]]
93+
; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s64) = G_AND [[AND1]], [[C]]
94+
; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s64) = G_AND [[AND2]], [[C]]
95+
; CHECK-NEXT: [[AND8:%[0-9]+]]:_(s64) = G_AND [[AND3]], [[C]]
96+
; CHECK-NEXT: [[AND9:%[0-9]+]]:_(s64) = G_AND [[AND4]], [[C1]]
97+
; CHECK-NEXT: G_STORE [[AND5]](s64), %ptr(p0) :: (store (s64), align 64)
98+
; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
99+
; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C2]](s64)
100+
; CHECK-NEXT: G_STORE [[AND6]](s64), [[PTR_ADD]](p0) :: (store (s64) into unknown-address + 8)
101+
; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
102+
; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C3]](s64)
103+
; CHECK-NEXT: G_STORE [[AND7]](s64), [[PTR_ADD1]](p0) :: (store (s64) into unknown-address + 16, align 16)
104+
; CHECK-NEXT: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 24
105+
; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C4]](s64)
106+
; CHECK-NEXT: G_STORE [[AND8]](s64), [[PTR_ADD2]](p0) :: (store (s64) into unknown-address + 24)
107+
; CHECK-NEXT: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
108+
; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C5]](s64)
109+
; CHECK-NEXT: G_STORE [[AND9]](s64), [[PTR_ADD3]](p0) :: (store (s64) into unknown-address + 32, align 32)
110+
; CHECK-NEXT: RET_ReallyLR implicit $x0
111+
%a:_(s318) = G_IMPLICIT_DEF
112+
%b:_(s318) = G_IMPLICIT_DEF
113+
%ptr:_(p0) = COPY $x0
114+
%and:_(s318) = G_AND %a, %b
115+
G_STORE %and(s318), %ptr(p0) :: (store (s318))
116+
RET_ReallyLR implicit $x0

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

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,64 @@ body: |
218218
successors:
219219
bb.3:
220220
RET_ReallyLR
221+
...
222+
---
223+
name: test_s318_eq
224+
tracksRegLiveness: true
225+
body: |
226+
; CHECK-LABEL: name: test_s318_eq
227+
; CHECK: bb.0:
228+
; CHECK: successors: %bb.1(0x40000000), %bb.2(0x40000000)
229+
; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
230+
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
231+
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4611686018427387903
232+
; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
233+
; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
234+
; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
235+
; CHECK: [[AND2:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
236+
; CHECK: [[AND3:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
237+
; CHECK: [[AND4:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
238+
; CHECK: [[AND5:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
239+
; CHECK: [[AND6:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
240+
; CHECK: [[AND7:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
241+
; CHECK: [[AND8:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
242+
; CHECK: [[AND9:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
243+
; CHECK: [[AND10:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
244+
; CHECK: [[AND11:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C]]
245+
; CHECK: [[AND12:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C1]]
246+
; CHECK: [[AND13:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
247+
; CHECK: [[AND14:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
248+
; CHECK: [[AND15:%[0-9]+]]:_(s64) = G_AND [[DEF]], [[C2]]
249+
; CHECK: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[AND]], [[AND8]]
250+
; CHECK: [[XOR1:%[0-9]+]]:_(s64) = G_XOR [[AND1]], [[AND9]]
251+
; CHECK: [[XOR2:%[0-9]+]]:_(s64) = G_XOR [[AND2]], [[AND10]]
252+
; CHECK: [[XOR3:%[0-9]+]]:_(s64) = G_XOR [[AND3]], [[AND11]]
253+
; CHECK: [[XOR4:%[0-9]+]]:_(s64) = G_XOR [[AND4]], [[AND12]]
254+
; CHECK: [[XOR5:%[0-9]+]]:_(s64) = G_XOR [[AND5]], [[AND13]]
255+
; CHECK: [[XOR6:%[0-9]+]]:_(s64) = G_XOR [[AND6]], [[AND14]]
256+
; CHECK: [[XOR7:%[0-9]+]]:_(s64) = G_XOR [[AND7]], [[AND15]]
257+
; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[XOR]], [[XOR1]]
258+
; CHECK: [[OR1:%[0-9]+]]:_(s64) = G_OR [[OR]], [[XOR2]]
259+
; CHECK: [[OR2:%[0-9]+]]:_(s64) = G_OR [[OR1]], [[XOR3]]
260+
; CHECK: [[OR3:%[0-9]+]]:_(s64) = G_OR [[OR2]], [[XOR4]]
261+
; CHECK: [[OR4:%[0-9]+]]:_(s64) = G_OR [[OR3]], [[XOR5]]
262+
; CHECK: [[OR5:%[0-9]+]]:_(s64) = G_OR [[OR4]], [[XOR6]]
263+
; CHECK: [[OR6:%[0-9]+]]:_(s64) = G_OR [[OR5]], [[XOR7]]
264+
; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[OR6]](s64), [[C2]]
265+
; CHECK: %cmp:_(s1) = G_TRUNC [[ICMP]](s32)
266+
; CHECK: G_BRCOND %cmp(s1), %bb.1
267+
; CHECK: G_BR %bb.2
268+
; CHECK: bb.1:
269+
; CHECK: successors:
270+
; CHECK: bb.2:
271+
; CHECK: RET_ReallyLR
272+
bb.1:
273+
%lhs:_(s318) = G_IMPLICIT_DEF
274+
%rhs:_(s318) = G_IMPLICIT_DEF
275+
%cmp:_(s1) = G_ICMP intpred(eq), %lhs(s318), %rhs
276+
G_BRCOND %cmp(s1), %bb.2
277+
G_BR %bb.3
278+
bb.2:
279+
successors:
280+
bb.3:
281+
RET_ReallyLR

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

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ body: |
4343
liveins: $x0
4444
; CHECK-LABEL: name: test_fconstant
4545
; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 1.000000e+00
46-
; CHECK: $w0 = COPY [[C]](s32)
47-
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00
48-
; CHECK: $x0 = COPY [[C1]](s64)
49-
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+00
50-
; CHECK: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[C2]](s32)
51-
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FPTRUNC]](s16)
52-
; CHECK: $w0 = COPY [[ANYEXT]](s32)
46+
; CHECK-NEXT: $w0 = COPY [[C]](s32)
47+
; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00
48+
; CHECK-NEXT: $x0 = COPY [[C1]](s64)
49+
; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+00
50+
; CHECK-NEXT: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[C2]](s32)
51+
; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FPTRUNC]](s16)
52+
; CHECK-NEXT: $w0 = COPY [[ANYEXT]](s32)
5353
%0:_(s32) = G_FCONSTANT float 1.0
5454
$w0 = COPY %0
5555
%1:_(s64) = G_FCONSTANT double 2.0
@@ -67,10 +67,46 @@ body: |
6767
liveins: $x0
6868
; CHECK-LABEL: name: s792
6969
; CHECK: %trunc:_(s32) = G_CONSTANT i32 0
70-
; CHECK: $w0 = COPY %trunc(s32)
71-
; CHECK: RET_ReallyLR implicit $w0
70+
; CHECK-NEXT: $w0 = COPY %trunc(s32)
71+
; CHECK-NEXT: RET_ReallyLR implicit $w0
7272
%cst:_(s792) = G_CONSTANT i792 0
7373
%trunc:_(s32) = G_TRUNC %cst(s792)
7474
$w0 = COPY %trunc(s32)
7575
RET_ReallyLR implicit $w0
7676
...
77+
---
78+
name: s318
79+
registers:
80+
body: |
81+
bb.0:
82+
liveins: $x0
83+
; CHECK-LABEL: name: s318
84+
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1234
85+
; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
86+
; CHECK-NEXT: %ptr:_(p0) = COPY $x0
87+
; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
88+
; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 4611686018427387903
89+
; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[C]], [[C2]]
90+
; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[C1]], [[C2]]
91+
; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND [[C1]], [[C2]]
92+
; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s64) = G_AND [[C1]], [[C2]]
93+
; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s64) = G_AND [[C1]], [[C3]]
94+
; CHECK-NEXT: G_STORE [[AND]](s64), %ptr(p0) :: (store (s64), align 64)
95+
; CHECK-NEXT: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
96+
; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C4]](s64)
97+
; CHECK-NEXT: G_STORE [[AND1]](s64), [[PTR_ADD]](p0) :: (store (s64) into unknown-address + 8)
98+
; CHECK-NEXT: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
99+
; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C5]](s64)
100+
; CHECK-NEXT: G_STORE [[AND2]](s64), [[PTR_ADD1]](p0) :: (store (s64) into unknown-address + 16, align 16)
101+
; CHECK-NEXT: [[C6:%[0-9]+]]:_(s64) = G_CONSTANT i64 24
102+
; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C6]](s64)
103+
; CHECK-NEXT: G_STORE [[AND3]](s64), [[PTR_ADD2]](p0) :: (store (s64) into unknown-address + 24)
104+
; CHECK-NEXT: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
105+
; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C7]](s64)
106+
; CHECK-NEXT: G_STORE [[AND4]](s64), [[PTR_ADD3]](p0) :: (store (s64) into unknown-address + 32, align 32)
107+
; CHECK-NEXT: RET_ReallyLR implicit $w0
108+
%cst:_(s318) = G_CONSTANT i318 1234
109+
%ptr:_(p0) = COPY $x0
110+
G_STORE %cst(s318), %ptr(p0) :: (store (s318))
111+
RET_ReallyLR implicit $w0
112+
...

0 commit comments

Comments
 (0)