Commit 11fbc6e
committed
[RegisterCoalescer] Mark implicit-defs of super-registers as dead in remat
Currently, something like:
```
$eax = MOV32ri -11, implicit-def $rax
%al = COPY $eax
```
Can be rematerialized as:
```
dead $eax = MOV32ri -11, implicit-def $rax
```
Which marks the full $rax as used, not just $al.
With this change, this is rematerialized as:
```
dead $eax = MOV32ri -11, implicit-def dead $rax, implicit-def $al
```
To indicate that only $al is used. This issue is latent right now, but
is exposed when llvm#134408 is applied, as it results in the register
pressure being incorrectly calculated.
I think this change is in line with past fixes in this area, notably:
llvm@059cead
llvm@69cd1211 parent 49cb25a commit 11fbc6e
File tree
2 files changed
+28
-6
lines changed- llvm
- lib/CodeGen
- test/CodeGen/X86
2 files changed
+28
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
| 1478 | + | |
| 1479 | + | |
1479 | 1480 | | |
1480 | 1481 | | |
1481 | 1482 | | |
| |||
1486 | 1487 | | |
1487 | 1488 | | |
1488 | 1489 | | |
1489 | | - | |
| 1490 | + | |
1490 | 1491 | | |
1491 | 1492 | | |
1492 | 1493 | | |
| |||
1640 | 1641 | | |
1641 | 1642 | | |
1642 | 1643 | | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
1643 | 1649 | | |
1644 | 1650 | | |
1645 | | - | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1646 | 1670 | | |
1647 | 1671 | | |
1648 | 1672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | 170 | | |
173 | 171 | | |
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | | - | |
| 177 | + | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
0 commit comments