Commit a0e8034
Automerge: [RegisterCoalescer] Mark implicit-defs of super-registers as dead in remat (#159110)
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.
Note: This issue is latent right now, but is exposed when #134408 is
applied, as it results in the register pressure being incorrectly
calculated (unless this patch is applied too).
I think this change is in line with past fixes in this area, notably:
llvm/llvm-project@059cead
llvm/llvm-project@69cd121File tree
2 files changed
+45
-13
lines changed- llvm
- lib/CodeGen
- test/CodeGen/X86
2 files changed
+45
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
| 1478 | + | |
1482 | 1479 | | |
1483 | 1480 | | |
1484 | 1481 | | |
1485 | 1482 | | |
1486 | 1483 | | |
1487 | 1484 | | |
1488 | 1485 | | |
1489 | | - | |
1490 | | - | |
1491 | | - | |
1492 | 1486 | | |
1493 | 1487 | | |
1494 | 1488 | | |
1495 | 1489 | | |
1496 | 1490 | | |
1497 | 1491 | | |
1498 | 1492 | | |
1499 | | - | |
| 1493 | + | |
1500 | 1494 | | |
1501 | 1495 | | |
1502 | 1496 | | |
| |||
1641 | 1635 | | |
1642 | 1636 | | |
1643 | 1637 | | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1644 | 1643 | | |
1645 | 1644 | | |
1646 | | - | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1647 | 1660 | | |
1648 | 1661 | | |
1649 | | - | |
1650 | 1662 | | |
1651 | 1663 | | |
1652 | 1664 | | |
| |||
1677 | 1689 | | |
1678 | 1690 | | |
1679 | 1691 | | |
1680 | | - | |
1681 | | - | |
| 1692 | + | |
| 1693 | + | |
1682 | 1694 | | |
1683 | 1695 | | |
1684 | 1696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
0 commit comments