Commit 972df2c
committed
[RISCV][GISel] Emit G_CONSTANT 0 as a copy from X0. (#67202)
We need to use a COPY so the register coalescer can replace reads
of the register we copy to with X0. This is needed so that we use
X0 on instructions that don't have an immediate form.
This was reviewed as #67202.1 parent 7cd01af commit 972df2c
File tree
4 files changed
+21
-23
lines changed- llvm
- lib/Target/RISCV/GISel
- test/CodeGen/RISCV/GlobalISel
- instruction-select
4 files changed
+21
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 231 | + | |
234 | 232 | | |
235 | 233 | | |
236 | 234 | | |
| |||
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 243 | | |
250 | 244 | | |
251 | 245 | | |
| |||
312 | 306 | | |
313 | 307 | | |
314 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| 362 | + | |
361 | 363 | | |
362 | 364 | | |
363 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | | - | |
143 | | - | |
| 141 | + | |
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
| |||
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
488 | 485 | | |
489 | 486 | | |
490 | 487 | | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | | - | |
495 | | - | |
| 491 | + | |
496 | 492 | | |
497 | 493 | | |
498 | 494 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
0 commit comments