1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 # RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=early-tailduplication -tail-dup-pred-size=3 -tail-dup-succ-size=3 %s -o - | FileCheck %s -check-prefix=LIMIT
3 # RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=early-tailduplication -tail-dup-pred-size=4 -tail-dup-succ-size=4 %s -o - | FileCheck %s -check-prefix=NOLIMIT
7 tracksRegLiveness: true
12 blocks: [ '%bb.2', '%bb.3', '%bb.4', '%bb.5' ]
14 blocks: [ '%bb.9', '%bb.10', '%bb.11', '%bb.12' ]
16 ; LIMIT-LABEL: name: foo
18 ; LIMIT-NEXT: successors: %bb.2(0x20000000), %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000)
19 ; LIMIT-NEXT: liveins: $rdi, $esi
21 ; LIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
22 ; LIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
23 ; LIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
24 ; LIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
25 ; LIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri]], %subreg.sub_32bit
26 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
29 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
31 ; LIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
32 ; LIMIT-NEXT: JMP_1 %bb.7
35 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
37 ; LIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
38 ; LIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
39 ; LIMIT-NEXT: JMP_1 %bb.7
42 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
44 ; LIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
45 ; LIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
46 ; LIMIT-NEXT: JMP_1 %bb.7
49 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
51 ; LIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
52 ; LIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
53 ; LIMIT-NEXT: JMP_1 %bb.7
56 ; LIMIT-NEXT: successors:
59 ; LIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
61 ; LIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[SHR32ri3]], %bb.5, [[SHR32ri2]], %bb.4, [[SHR32ri1]], %bb.3, [[MOV32rm]], %bb.2
62 ; LIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
63 ; LIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri4]], 7, implicit-def dead $eflags
64 ; LIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri1]], %subreg.sub_32bit
65 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
68 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
70 ; LIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
71 ; LIMIT-NEXT: JMP_1 %bb.13
74 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
76 ; LIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
77 ; LIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
78 ; LIMIT-NEXT: JMP_1 %bb.13
81 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
83 ; LIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
84 ; LIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
85 ; LIMIT-NEXT: JMP_1 %bb.13
88 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
90 ; LIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
91 ; LIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
94 ; LIMIT-NEXT: [[PHI1:%[0-9]+]]:gr32 = PHI [[SHR32ri7]], %bb.12, [[SHR32ri6]], %bb.11, [[SHR32ri5]], %bb.10, [[MOV32rm4]], %bb.9
95 ; LIMIT-NEXT: [[OR32rr:%[0-9]+]]:gr32 = OR32rr [[PHI1]], [[PHI]], implicit-def dead $eflags
96 ; LIMIT-NEXT: $eax = COPY [[OR32rr]]
97 ; LIMIT-NEXT: RET 0, $eax
99 ; NOLIMIT-LABEL: name: foo
101 ; NOLIMIT-NEXT: successors: %bb.2(0x20000000), %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000)
102 ; NOLIMIT-NEXT: liveins: $rdi, $esi
103 ; NOLIMIT-NEXT: {{ $}}
104 ; NOLIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
105 ; NOLIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
106 ; NOLIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
107 ; NOLIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
108 ; NOLIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri]], %subreg.sub_32bit
109 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
110 ; NOLIMIT-NEXT: {{ $}}
111 ; NOLIMIT-NEXT: bb.2:
112 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
113 ; NOLIMIT-NEXT: {{ $}}
114 ; NOLIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
115 ; NOLIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
116 ; NOLIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri1]], 7, implicit-def dead $eflags
117 ; NOLIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri1]], %subreg.sub_32bit
118 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
119 ; NOLIMIT-NEXT: {{ $}}
120 ; NOLIMIT-NEXT: bb.3:
121 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
122 ; NOLIMIT-NEXT: {{ $}}
123 ; NOLIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
124 ; NOLIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
125 ; NOLIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
126 ; NOLIMIT-NEXT: [[AND32ri2:%[0-9]+]]:gr32 = AND32ri [[SHR32ri3]], 7, implicit-def dead $eflags
127 ; NOLIMIT-NEXT: [[SUBREG_TO_REG2:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri2]], %subreg.sub_32bit
128 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG2]], %jump-table.1, $noreg
129 ; NOLIMIT-NEXT: {{ $}}
130 ; NOLIMIT-NEXT: bb.4:
131 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
132 ; NOLIMIT-NEXT: {{ $}}
133 ; NOLIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
134 ; NOLIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
135 ; NOLIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
136 ; NOLIMIT-NEXT: [[AND32ri3:%[0-9]+]]:gr32 = AND32ri [[SHR32ri5]], 7, implicit-def dead $eflags
137 ; NOLIMIT-NEXT: [[SUBREG_TO_REG3:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri3]], %subreg.sub_32bit
138 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG3]], %jump-table.1, $noreg
139 ; NOLIMIT-NEXT: {{ $}}
140 ; NOLIMIT-NEXT: bb.5:
141 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
142 ; NOLIMIT-NEXT: {{ $}}
143 ; NOLIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
144 ; NOLIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
145 ; NOLIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
146 ; NOLIMIT-NEXT: [[AND32ri4:%[0-9]+]]:gr32 = AND32ri [[SHR32ri7]], 7, implicit-def dead $eflags
147 ; NOLIMIT-NEXT: [[SUBREG_TO_REG4:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri4]], %subreg.sub_32bit
148 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG4]], %jump-table.1, $noreg
149 ; NOLIMIT-NEXT: {{ $}}
150 ; NOLIMIT-NEXT: bb.6:
151 ; NOLIMIT-NEXT: successors:
152 ; NOLIMIT-NEXT: {{ $}}
153 ; NOLIMIT-NEXT: bb.9:
154 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
155 ; NOLIMIT-NEXT: {{ $}}
156 ; NOLIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[MOV32rm]], %bb.2, [[SHR32ri2]], %bb.3, [[SHR32ri4]], %bb.4, [[SHR32ri6]], %bb.5
157 ; NOLIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
158 ; NOLIMIT-NEXT: JMP_1 %bb.13
159 ; NOLIMIT-NEXT: {{ $}}
160 ; NOLIMIT-NEXT: bb.10:
161 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
162 ; NOLIMIT-NEXT: {{ $}}
163 ; NOLIMIT-NEXT: [[PHI1:%[0-9]+]]:gr32 = PHI [[MOV32rm]], %bb.2, [[SHR32ri2]], %bb.3, [[SHR32ri4]], %bb.4, [[SHR32ri6]], %bb.5
164 ; NOLIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
165 ; NOLIMIT-NEXT: [[SHR32ri8:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
166 ; NOLIMIT-NEXT: JMP_1 %bb.13
167 ; NOLIMIT-NEXT: {{ $}}
168 ; NOLIMIT-NEXT: bb.11:
169 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
170 ; NOLIMIT-NEXT: {{ $}}
171 ; NOLIMIT-NEXT: [[PHI2:%[0-9]+]]:gr32 = PHI [[MOV32rm]], %bb.2, [[SHR32ri2]], %bb.3, [[SHR32ri4]], %bb.4, [[SHR32ri6]], %bb.5
172 ; NOLIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
173 ; NOLIMIT-NEXT: [[SHR32ri9:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
174 ; NOLIMIT-NEXT: JMP_1 %bb.13
175 ; NOLIMIT-NEXT: {{ $}}
176 ; NOLIMIT-NEXT: bb.12:
177 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
178 ; NOLIMIT-NEXT: {{ $}}
179 ; NOLIMIT-NEXT: [[PHI3:%[0-9]+]]:gr32 = PHI [[MOV32rm]], %bb.2, [[SHR32ri2]], %bb.3, [[SHR32ri4]], %bb.4, [[SHR32ri6]], %bb.5
180 ; NOLIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
181 ; NOLIMIT-NEXT: [[SHR32ri10:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
182 ; NOLIMIT-NEXT: {{ $}}
183 ; NOLIMIT-NEXT: bb.13:
184 ; NOLIMIT-NEXT: [[PHI4:%[0-9]+]]:gr32 = PHI [[PHI]], %bb.9, [[PHI1]], %bb.10, [[PHI2]], %bb.11, [[PHI3]], %bb.12
185 ; NOLIMIT-NEXT: [[PHI5:%[0-9]+]]:gr32 = PHI [[SHR32ri10]], %bb.12, [[SHR32ri9]], %bb.11, [[SHR32ri8]], %bb.10, [[MOV32rm4]], %bb.9
186 ; NOLIMIT-NEXT: [[OR32rr:%[0-9]+]]:gr32 = OR32rr [[PHI5]], [[PHI4]], implicit-def dead $eflags
187 ; NOLIMIT-NEXT: $eax = COPY [[OR32rr]]
188 ; NOLIMIT-NEXT: RET 0, $eax
194 %13:gr32 = SHR32ri %11, 1, implicit-def dead $eflags
195 %14:gr32 = AND32ri %13, 7, implicit-def dead $eflags
196 %12:gr64_nosp = SUBREG_TO_REG 0, killed %14, %subreg.sub_32bit
199 successors: %bb.2, %bb.3, %bb.4, %bb.5
201 JMP64m $noreg, 8, %12, %jump-table.0, $noreg
204 %0:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
208 %17:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
209 %1:gr32 = SHR32ri %17, 1, implicit-def dead $eflags
213 %16:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
214 %2:gr32 = SHR32ri %16, 2, implicit-def dead $eflags
218 %15:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
219 %3:gr32 = SHR32ri %15, 3, implicit-def dead $eflags
226 %4:gr32 = PHI %3, %bb.5, %2, %bb.4, %1, %bb.3, %0, %bb.2
227 %19:gr32 = SHR32ri %11, 2, implicit-def dead $eflags
228 %20:gr32 = AND32ri %19, 7, implicit-def dead $eflags
229 %18:gr64_nosp = SUBREG_TO_REG 0, killed %20, %subreg.sub_32bit
232 successors: %bb.9, %bb.10, %bb.11, %bb.12
234 JMP64m $noreg, 8, %18, %jump-table.1, $noreg
237 %5:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
241 %23:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
242 %6:gr32 = SHR32ri %23, 1, implicit-def dead $eflags
246 %22:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
247 %7:gr32 = SHR32ri %22, 2, implicit-def dead $eflags
251 %21:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
252 %8:gr32 = SHR32ri %21, 6, implicit-def dead $eflags
255 %9:gr32 = PHI %8, %bb.12, %7, %bb.11, %6, %bb.10, %5, %bb.9
256 %24:gr32 = OR32rr %9, %4, implicit-def dead $eflags
261 # Based on foo, but with a phi node in a successor of %bb.7 instead of %bb.7.
263 name: foo_phi_in_tailbb_successor
264 tracksRegLiveness: true
269 blocks: [ '%bb.2', '%bb.3', '%bb.4', '%bb.5', '%bb.9' ]
271 blocks: [ '%bb.9', '%bb.10', '%bb.11', '%bb.12' ]
273 ; LIMIT-LABEL: name: foo_phi_in_tailbb_successor
275 ; LIMIT-NEXT: successors: %bb.2(0x1999999a), %bb.3(0x1999999a), %bb.4(0x1999999a), %bb.5(0x1999999a), %bb.9(0x1999999a)
276 ; LIMIT-NEXT: liveins: $rdi, $esi
278 ; LIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
279 ; LIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
280 ; LIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
281 ; LIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
282 ; LIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri]], %subreg.sub_32bit
283 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
286 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
288 ; LIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
289 ; LIMIT-NEXT: JMP_1 %bb.7
292 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
294 ; LIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
295 ; LIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
296 ; LIMIT-NEXT: JMP_1 %bb.7
299 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
301 ; LIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
302 ; LIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
303 ; LIMIT-NEXT: JMP_1 %bb.7
306 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
308 ; LIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
309 ; LIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
310 ; LIMIT-NEXT: JMP_1 %bb.7
313 ; LIMIT-NEXT: successors:
316 ; LIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
318 ; LIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
319 ; LIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri4]], 7, implicit-def dead $eflags
320 ; LIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri1]], %subreg.sub_32bit
321 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
324 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
326 ; LIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[AND32ri]], %bb.0, [[AND32ri1]], %bb.7
327 ; LIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
328 ; LIMIT-NEXT: JMP_1 %bb.13
331 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
333 ; LIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
334 ; LIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
335 ; LIMIT-NEXT: JMP_1 %bb.13
338 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
340 ; LIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
341 ; LIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
342 ; LIMIT-NEXT: JMP_1 %bb.13
345 ; LIMIT-NEXT: successors: %bb.13(0x80000000)
347 ; LIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
348 ; LIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
351 ; LIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[SHR32ri7]], %bb.12, [[SHR32ri6]], %bb.11, [[SHR32ri5]], %bb.10, [[MOV32rm4]], %bb.9
352 ; LIMIT-NEXT: [[OR32ri:%[0-9]+]]:gr32 = OR32ri [[PHI]], 1, implicit-def dead $eflags
353 ; LIMIT-NEXT: $eax = COPY [[OR32ri]]
354 ; LIMIT-NEXT: RET 0, $eax
356 ; NOLIMIT-LABEL: name: foo_phi_in_tailbb_successor
358 ; NOLIMIT-NEXT: successors: %bb.2(0x1999999a), %bb.3(0x1999999a), %bb.4(0x1999999a), %bb.5(0x1999999a), %bb.9(0x1999999a)
359 ; NOLIMIT-NEXT: liveins: $rdi, $esi
360 ; NOLIMIT-NEXT: {{ $}}
361 ; NOLIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
362 ; NOLIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
363 ; NOLIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
364 ; NOLIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
365 ; NOLIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri]], %subreg.sub_32bit
366 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
367 ; NOLIMIT-NEXT: {{ $}}
368 ; NOLIMIT-NEXT: bb.2:
369 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
370 ; NOLIMIT-NEXT: {{ $}}
371 ; NOLIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
372 ; NOLIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
373 ; NOLIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri1]], 7, implicit-def dead $eflags
374 ; NOLIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri1]], %subreg.sub_32bit
375 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
376 ; NOLIMIT-NEXT: {{ $}}
377 ; NOLIMIT-NEXT: bb.3:
378 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
379 ; NOLIMIT-NEXT: {{ $}}
380 ; NOLIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
381 ; NOLIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
382 ; NOLIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
383 ; NOLIMIT-NEXT: [[AND32ri2:%[0-9]+]]:gr32 = AND32ri [[SHR32ri3]], 7, implicit-def dead $eflags
384 ; NOLIMIT-NEXT: [[SUBREG_TO_REG2:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri2]], %subreg.sub_32bit
385 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG2]], %jump-table.1, $noreg
386 ; NOLIMIT-NEXT: {{ $}}
387 ; NOLIMIT-NEXT: bb.4:
388 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
389 ; NOLIMIT-NEXT: {{ $}}
390 ; NOLIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
391 ; NOLIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
392 ; NOLIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
393 ; NOLIMIT-NEXT: [[AND32ri3:%[0-9]+]]:gr32 = AND32ri [[SHR32ri5]], 7, implicit-def dead $eflags
394 ; NOLIMIT-NEXT: [[SUBREG_TO_REG3:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri3]], %subreg.sub_32bit
395 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG3]], %jump-table.1, $noreg
396 ; NOLIMIT-NEXT: {{ $}}
397 ; NOLIMIT-NEXT: bb.5:
398 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
399 ; NOLIMIT-NEXT: {{ $}}
400 ; NOLIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
401 ; NOLIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
402 ; NOLIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
403 ; NOLIMIT-NEXT: [[AND32ri4:%[0-9]+]]:gr32 = AND32ri [[SHR32ri7]], 7, implicit-def dead $eflags
404 ; NOLIMIT-NEXT: [[SUBREG_TO_REG4:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri4]], %subreg.sub_32bit
405 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG4]], %jump-table.1, $noreg
406 ; NOLIMIT-NEXT: {{ $}}
407 ; NOLIMIT-NEXT: bb.6:
408 ; NOLIMIT-NEXT: successors:
409 ; NOLIMIT-NEXT: {{ $}}
410 ; NOLIMIT-NEXT: bb.9:
411 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
412 ; NOLIMIT-NEXT: {{ $}}
413 ; NOLIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[AND32ri]], %bb.0, [[AND32ri1]], %bb.2, [[AND32ri2]], %bb.3, [[AND32ri3]], %bb.4, [[AND32ri4]], %bb.5
414 ; NOLIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
415 ; NOLIMIT-NEXT: JMP_1 %bb.13
416 ; NOLIMIT-NEXT: {{ $}}
417 ; NOLIMIT-NEXT: bb.10:
418 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
419 ; NOLIMIT-NEXT: {{ $}}
420 ; NOLIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
421 ; NOLIMIT-NEXT: [[SHR32ri8:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
422 ; NOLIMIT-NEXT: JMP_1 %bb.13
423 ; NOLIMIT-NEXT: {{ $}}
424 ; NOLIMIT-NEXT: bb.11:
425 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
426 ; NOLIMIT-NEXT: {{ $}}
427 ; NOLIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
428 ; NOLIMIT-NEXT: [[SHR32ri9:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
429 ; NOLIMIT-NEXT: JMP_1 %bb.13
430 ; NOLIMIT-NEXT: {{ $}}
431 ; NOLIMIT-NEXT: bb.12:
432 ; NOLIMIT-NEXT: successors: %bb.13(0x80000000)
433 ; NOLIMIT-NEXT: {{ $}}
434 ; NOLIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
435 ; NOLIMIT-NEXT: [[SHR32ri10:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
436 ; NOLIMIT-NEXT: {{ $}}
437 ; NOLIMIT-NEXT: bb.13:
438 ; NOLIMIT-NEXT: [[PHI:%[0-9]+]]:gr32 = PHI [[SHR32ri10]], %bb.12, [[SHR32ri9]], %bb.11, [[SHR32ri8]], %bb.10, [[MOV32rm4]], %bb.9
439 ; NOLIMIT-NEXT: [[OR32ri:%[0-9]+]]:gr32 = OR32ri [[PHI]], 1, implicit-def dead $eflags
440 ; NOLIMIT-NEXT: $eax = COPY [[OR32ri]]
441 ; NOLIMIT-NEXT: RET 0, $eax
447 %13:gr32 = SHR32ri %11, 1, implicit-def dead $eflags
448 %14:gr32 = AND32ri %13, 7, implicit-def dead $eflags
449 %12:gr64_nosp = SUBREG_TO_REG 0, %14, %subreg.sub_32bit
452 successors: %bb.2, %bb.3, %bb.4, %bb.5, %bb.9
454 JMP64m $noreg, 8, %12, %jump-table.0, $noreg
457 %0:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
461 %17:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
462 %1:gr32 = SHR32ri %17, 1, implicit-def dead $eflags
466 %16:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
467 %2:gr32 = SHR32ri %16, 2, implicit-def dead $eflags
471 %15:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
472 %3:gr32 = SHR32ri %15, 3, implicit-def dead $eflags
479 %19:gr32 = SHR32ri %11, 2, implicit-def dead $eflags
480 %20:gr32 = AND32ri %19, 7, implicit-def dead $eflags
481 %18:gr64_nosp = SUBREG_TO_REG 0, %20, %subreg.sub_32bit
484 successors: %bb.9, %bb.10, %bb.11, %bb.12
486 JMP64m $noreg, 8, %18, %jump-table.1, $noreg
489 %9:gr32 = PHI %14, %bb.1, %20, %bb.8
490 %5:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
494 %23:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
495 %6:gr32 = SHR32ri %23, 1, implicit-def dead $eflags
499 %22:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
500 %7:gr32 = SHR32ri %22, 2, implicit-def dead $eflags
504 %21:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
505 %8:gr32 = SHR32ri %21, 6, implicit-def dead $eflags
508 %9:gr32 = PHI %8, %bb.12, %7, %bb.11, %6, %bb.10, %5, %bb.9
509 %24:gr32 = OR32ri %9, 1, implicit-def dead $eflags
516 # Based on foo, but without any phi nodes.
519 tracksRegLiveness: true
524 blocks: [ '%bb.2', '%bb.3', '%bb.4', '%bb.5' ]
526 blocks: [ '%bb.9', '%bb.10', '%bb.11', '%bb.12' ]
528 ; LIMIT-LABEL: name: foo_no_phis
530 ; LIMIT-NEXT: successors: %bb.2(0x20000000), %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000)
531 ; LIMIT-NEXT: liveins: $rdi, $esi
533 ; LIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
534 ; LIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
535 ; LIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
536 ; LIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
537 ; LIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri]], %subreg.sub_32bit
538 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
541 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
543 ; LIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
544 ; LIMIT-NEXT: JMP_1 %bb.7
547 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
549 ; LIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
550 ; LIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
551 ; LIMIT-NEXT: JMP_1 %bb.7
554 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
556 ; LIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
557 ; LIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
558 ; LIMIT-NEXT: JMP_1 %bb.7
561 ; LIMIT-NEXT: successors: %bb.7(0x80000000)
563 ; LIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
564 ; LIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
565 ; LIMIT-NEXT: JMP_1 %bb.7
568 ; LIMIT-NEXT: successors:
571 ; LIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
573 ; LIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
574 ; LIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri4]], 7, implicit-def dead $eflags
575 ; LIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri1]], %subreg.sub_32bit
576 ; LIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
579 ; LIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
580 ; LIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[MOV32rm4]] :: (store (s32))
581 ; LIMIT-NEXT: $eax = COPY [[MOV32rm4]]
582 ; LIMIT-NEXT: RET 0, $eax
585 ; LIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
586 ; LIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
587 ; LIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri5]] :: (store (s32))
588 ; LIMIT-NEXT: $eax = COPY [[SHR32ri5]]
589 ; LIMIT-NEXT: RET 0, $eax
592 ; LIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
593 ; LIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
594 ; LIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri6]] :: (store (s32))
595 ; LIMIT-NEXT: $eax = COPY [[SHR32ri6]]
596 ; LIMIT-NEXT: RET 0, $eax
599 ; LIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
600 ; LIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
601 ; LIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri7]] :: (store (s32))
602 ; LIMIT-NEXT: $eax = COPY [[SHR32ri7]]
603 ; LIMIT-NEXT: RET 0, $eax
605 ; NOLIMIT-LABEL: name: foo_no_phis
607 ; NOLIMIT-NEXT: successors: %bb.2(0x20000000), %bb.3(0x20000000), %bb.4(0x20000000), %bb.5(0x20000000)
608 ; NOLIMIT-NEXT: liveins: $rdi, $esi
609 ; NOLIMIT-NEXT: {{ $}}
610 ; NOLIMIT-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY $esi
611 ; NOLIMIT-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
612 ; NOLIMIT-NEXT: [[SHR32ri:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 1, implicit-def dead $eflags
613 ; NOLIMIT-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[SHR32ri]], 7, implicit-def dead $eflags
614 ; NOLIMIT-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, killed [[AND32ri]], %subreg.sub_32bit
615 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG]], %jump-table.0, $noreg
616 ; NOLIMIT-NEXT: {{ $}}
617 ; NOLIMIT-NEXT: bb.2:
618 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
619 ; NOLIMIT-NEXT: {{ $}}
620 ; NOLIMIT-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
621 ; NOLIMIT-NEXT: [[SHR32ri1:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
622 ; NOLIMIT-NEXT: [[AND32ri1:%[0-9]+]]:gr32 = AND32ri [[SHR32ri1]], 7, implicit-def dead $eflags
623 ; NOLIMIT-NEXT: [[SUBREG_TO_REG1:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri1]], %subreg.sub_32bit
624 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG1]], %jump-table.1, $noreg
625 ; NOLIMIT-NEXT: {{ $}}
626 ; NOLIMIT-NEXT: bb.3:
627 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
628 ; NOLIMIT-NEXT: {{ $}}
629 ; NOLIMIT-NEXT: [[MOV32rm1:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
630 ; NOLIMIT-NEXT: [[SHR32ri2:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm1]], 1, implicit-def dead $eflags
631 ; NOLIMIT-NEXT: [[SHR32ri3:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
632 ; NOLIMIT-NEXT: [[AND32ri2:%[0-9]+]]:gr32 = AND32ri [[SHR32ri3]], 7, implicit-def dead $eflags
633 ; NOLIMIT-NEXT: [[SUBREG_TO_REG2:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri2]], %subreg.sub_32bit
634 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG2]], %jump-table.1, $noreg
635 ; NOLIMIT-NEXT: {{ $}}
636 ; NOLIMIT-NEXT: bb.4:
637 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
638 ; NOLIMIT-NEXT: {{ $}}
639 ; NOLIMIT-NEXT: [[MOV32rm2:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
640 ; NOLIMIT-NEXT: [[SHR32ri4:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm2]], 2, implicit-def dead $eflags
641 ; NOLIMIT-NEXT: [[SHR32ri5:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
642 ; NOLIMIT-NEXT: [[AND32ri3:%[0-9]+]]:gr32 = AND32ri [[SHR32ri5]], 7, implicit-def dead $eflags
643 ; NOLIMIT-NEXT: [[SUBREG_TO_REG3:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri3]], %subreg.sub_32bit
644 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG3]], %jump-table.1, $noreg
645 ; NOLIMIT-NEXT: {{ $}}
646 ; NOLIMIT-NEXT: bb.5:
647 ; NOLIMIT-NEXT: successors: %bb.9(0x20000000), %bb.10(0x20000000), %bb.11(0x20000000), %bb.12(0x20000000)
648 ; NOLIMIT-NEXT: {{ $}}
649 ; NOLIMIT-NEXT: [[MOV32rm3:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
650 ; NOLIMIT-NEXT: [[SHR32ri6:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm3]], 3, implicit-def dead $eflags
651 ; NOLIMIT-NEXT: [[SHR32ri7:%[0-9]+]]:gr32 = SHR32ri [[COPY]], 2, implicit-def dead $eflags
652 ; NOLIMIT-NEXT: [[AND32ri4:%[0-9]+]]:gr32 = AND32ri [[SHR32ri7]], 7, implicit-def dead $eflags
653 ; NOLIMIT-NEXT: [[SUBREG_TO_REG4:%[0-9]+]]:gr64_nosp = SUBREG_TO_REG 0, [[AND32ri4]], %subreg.sub_32bit
654 ; NOLIMIT-NEXT: JMP64m $noreg, 8, [[SUBREG_TO_REG4]], %jump-table.1, $noreg
655 ; NOLIMIT-NEXT: {{ $}}
656 ; NOLIMIT-NEXT: bb.6:
657 ; NOLIMIT-NEXT: successors:
658 ; NOLIMIT-NEXT: {{ $}}
659 ; NOLIMIT-NEXT: bb.9:
660 ; NOLIMIT-NEXT: [[MOV32rm4:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
661 ; NOLIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[MOV32rm4]] :: (store (s32))
662 ; NOLIMIT-NEXT: $eax = COPY [[MOV32rm4]]
663 ; NOLIMIT-NEXT: RET 0, $eax
664 ; NOLIMIT-NEXT: {{ $}}
665 ; NOLIMIT-NEXT: bb.10:
666 ; NOLIMIT-NEXT: [[MOV32rm5:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
667 ; NOLIMIT-NEXT: [[SHR32ri8:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm5]], 1, implicit-def dead $eflags
668 ; NOLIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri8]] :: (store (s32))
669 ; NOLIMIT-NEXT: $eax = COPY [[SHR32ri8]]
670 ; NOLIMIT-NEXT: RET 0, $eax
671 ; NOLIMIT-NEXT: {{ $}}
672 ; NOLIMIT-NEXT: bb.11:
673 ; NOLIMIT-NEXT: [[MOV32rm6:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
674 ; NOLIMIT-NEXT: [[SHR32ri9:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm6]], 2, implicit-def dead $eflags
675 ; NOLIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri9]] :: (store (s32))
676 ; NOLIMIT-NEXT: $eax = COPY [[SHR32ri9]]
677 ; NOLIMIT-NEXT: RET 0, $eax
678 ; NOLIMIT-NEXT: {{ $}}
679 ; NOLIMIT-NEXT: bb.12:
680 ; NOLIMIT-NEXT: [[MOV32rm7:%[0-9]+]]:gr32 = MOV32rm [[COPY1]], 1, $noreg, 0, $noreg
681 ; NOLIMIT-NEXT: [[SHR32ri10:%[0-9]+]]:gr32 = SHR32ri [[MOV32rm7]], 6, implicit-def dead $eflags
682 ; NOLIMIT-NEXT: MOV32mr [[COPY1]], 1, $noreg, 0, $noreg, [[SHR32ri10]] :: (store (s32))
683 ; NOLIMIT-NEXT: $eax = COPY [[SHR32ri10]]
684 ; NOLIMIT-NEXT: RET 0, $eax
690 %13:gr32 = SHR32ri %11, 1, implicit-def dead $eflags
691 %14:gr32 = AND32ri %13, 7, implicit-def dead $eflags
692 %12:gr64_nosp = SUBREG_TO_REG 0, killed %14, %subreg.sub_32bit
695 successors: %bb.2, %bb.3, %bb.4, %bb.5
697 JMP64m $noreg, 8, %12, %jump-table.0, $noreg
700 %0:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
704 %17:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
705 %1:gr32 = SHR32ri %17, 1, implicit-def dead $eflags
709 %16:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
710 %2:gr32 = SHR32ri %16, 2, implicit-def dead $eflags
714 %15:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
715 %3:gr32 = SHR32ri %15, 3, implicit-def dead $eflags
722 %19:gr32 = SHR32ri %11, 2, implicit-def dead $eflags
723 %20:gr32 = AND32ri %19, 7, implicit-def dead $eflags
724 %18:gr64_nosp = SUBREG_TO_REG 0, killed %20, %subreg.sub_32bit
727 successors: %bb.9, %bb.10, %bb.11, %bb.12
729 JMP64m $noreg, 8, %18, %jump-table.1, $noreg
732 %5:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
733 MOV32mr %10, 1, $noreg, 0, $noreg, %5 :: (store (s32))
738 %23:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
739 %6:gr32 = SHR32ri %23, 1, implicit-def dead $eflags
740 MOV32mr %10, 1, $noreg, 0, $noreg, %6 :: (store (s32))
745 %22:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
746 %7:gr32 = SHR32ri %22, 2, implicit-def dead $eflags
747 MOV32mr %10, 1, $noreg, 0, $noreg, %7 :: (store (s32))
752 %21:gr32 = MOV32rm %10, 1, $noreg, 0, $noreg
753 %8:gr32 = SHR32ri %21, 6, implicit-def dead $eflags
754 MOV32mr %10, 1, $noreg, 0, $noreg, %8 :: (store (s32))