File: legalize-build-vector.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (175 lines) | stat: -rw-r--r-- 6,863 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-linux-gnu -O0 -run-pass=legalizer %s -o - | FileCheck %s

---
name:            legal_v4s32
body: |
  bb.0:
    liveins: $w0, $w1, $w2, $w3
    ; CHECK-LABEL: name: legal_v4s32
    ; CHECK: liveins: $w0, $w1, $w2, $w3
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $w1
    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY $w2
    ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $w3
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[COPY1]](s32), [[COPY2]](s32), [[COPY3]](s32)
    ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<4 x s32>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s32) = COPY $w0
    %1:_(s32) = COPY $w1
    %2:_(s32) = COPY $w2
    %3:_(s32) = COPY $w3
    %4:_(<4 x s32>) = G_BUILD_VECTOR %0(s32), %1(s32), %2(s32), %3(s32)
    $q0 = COPY %4(<4 x s32>)
    RET_ReallyLR
...
---
name:            legal_v2s64
body: |
  bb.0:
    liveins: $x0, $x1
    ; CHECK-LABEL: name: legal_v2s64
    ; CHECK: liveins: $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[COPY]](s64), [[COPY1]](s64)
    ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<2 x s64>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s64) = COPY $x0
    %1:_(s64) = COPY $x1
    %2:_(<2 x s64>) = G_BUILD_VECTOR %0(s64), %1(s64)
    $q0 = COPY %2(<2 x s64>)
    RET_ReallyLR
...
---
name:            legal_v2p0
body: |
  bb.0:
    liveins: $x0, $x1
    ; CHECK-LABEL: name: legal_v2p0
    ; CHECK: liveins: $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x1
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x p0>) = G_BUILD_VECTOR [[COPY]](p0), [[COPY1]](p0)
    ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<2 x p0>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(p0) = COPY $x0
    %1:_(p0) = COPY $x1
    %2:_(<2 x p0>) = G_BUILD_VECTOR %0(p0), %1(p0)
    $q0 = COPY %2(<2 x p0>)
    RET_ReallyLR
...
---
name:            legal_v16s8
body: |
  bb.0:
    ; CHECK-LABEL: name: legal_v16s8
    ; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8)
    ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<16 x s8>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s8) = G_IMPLICIT_DEF
    %1:_(s8) = G_IMPLICIT_DEF
    %2:_(<16 x s8>) = G_BUILD_VECTOR %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8)
    $q0 = COPY %2(<16 x s8>)
    RET_ReallyLR
...
---
name:            legal_v8s8
body: |
  bb.0:
    ; CHECK-LABEL: name: legal_v8s8
    ; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8)
    ; CHECK-NEXT: $d0 = COPY [[BUILD_VECTOR]](<8 x s8>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s8) = G_IMPLICIT_DEF
    %1:_(s8) = G_IMPLICIT_DEF
    %2:_(<8 x s8>) = G_BUILD_VECTOR %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8), %0(s8), %1(s8)
    $d0 = COPY %2(<8 x s8>)
    RET_ReallyLR
...
---
name:            widen_v16s1
body: |
  bb.0:
    ; CHECK-LABEL: name: widen_v16s1
    ; CHECK: [[DEF:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s8>) = G_BUILD_VECTOR [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8), [[DEF]](s8), [[DEF1]](s8)
    ; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<16 x s8>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s1) = G_IMPLICIT_DEF
    %1:_(s1) = G_IMPLICIT_DEF
    %2:_(<16 x s1>) = G_BUILD_VECTOR %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1), %0(s1), %1(s1)
    %w:_(<16 x s8>) = G_ANYEXT %2
    $q0 = COPY %w(<16 x s8>)
    RET_ReallyLR
...
---
name:            widen_v2s16
body: |
  bb.0:
    liveins: $x0, $x1
    ; CHECK-LABEL: name: widen_v2s16
    ; CHECK: liveins: $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY $h0
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s16) = COPY $h1
    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[COPY]](s16)
    ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[COPY1]](s16)
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32)
    ; CHECK-NEXT: $d0 = COPY [[BUILD_VECTOR]](<2 x s32>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s16) = COPY $h0
    %1:_(s16) = COPY $h1
    %2:_(<2 x s16>) = G_BUILD_VECTOR %0(s16), %1(s16)
    %ext:_(<2 x s32>) = G_ANYEXT %2(<2 x s16>)
    $d0 = COPY %ext(<2 x s32>)
    RET_ReallyLR
...

---
name:            widen_v2s8
body: |
  bb.0:
    ; CHECK-LABEL: name: widen_v2s8
    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[DEF]](s32)
    ; CHECK-NEXT: $d0 = COPY [[BUILD_VECTOR]](<2 x s32>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s8) = G_IMPLICIT_DEF
    %1:_(s8) = G_IMPLICIT_DEF
    %2:_(<2 x s8>) = G_BUILD_VECTOR %0(s8), %1(s8)
    %ext:_(<2 x s32>) = G_ANYEXT %2(<2 x s8>)
    $d0 = COPY %ext(<2 x s32>)
    RET_ReallyLR
...

---
name:            widen_v4s8
body: |
  bb.0:
    ; CHECK-LABEL: name: widen_v4s8
    ; CHECK: [[DEF:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY [[DEF]](s16)
    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s16) = COPY [[DEF]](s16)
    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s16) = COPY [[DEF]](s16)
    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s16>) = G_BUILD_VECTOR [[COPY]](s16), [[COPY1]](s16), [[COPY2]](s16), [[DEF]](s16)
    ; CHECK-NEXT: $d0 = COPY [[BUILD_VECTOR]](<4 x s16>)
    ; CHECK-NEXT: RET_ReallyLR
    %0:_(s8) = G_IMPLICIT_DEF
    %1:_(s8) = G_IMPLICIT_DEF
    %2:_(s8) = G_IMPLICIT_DEF
    %3:_(s8) = G_IMPLICIT_DEF
    %4:_(<4 x s8>) = G_BUILD_VECTOR %0(s8), %1(s8), %2(s8), %3(s8)
    %ext:_(<4 x s16>) = G_ANYEXT %4(<4 x s8>)
    $d0 = COPY %ext(<4 x s16>)
    RET_ReallyLR
...