Commit eeb9aaa
committed
[SelectionDAG] Combine range metadata when loads are CSEd.
When CSEing a load with an existing load with different range
metadata, clear the range metadata on the existing
load.
This is conservative, alternatively we could calculate new range
metadata using getMostGenericRange. Without a test case I wasn't
sure it was worth it.
getMostGenericRange takes a non-const MDNode*, but all of SelectionDAG
uses const MDNode*. A const_cast will need to be used somewhere or
we need to make the code base consistent about whether MDNode pointers
should be const or not.
I'm sure this isn't the only place that needs to be updated to handle
the CSE.
Fixes #145363.1 parent 81eb3be commit eeb9aaa
File tree
3 files changed
+21
-8
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen/SelectionDAG
- test/CodeGen/RISCV
3 files changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
1500 | 1508 | | |
1501 | 1509 | | |
1502 | 1510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1275 | 1275 | | |
1276 | 1276 | | |
1277 | 1277 | | |
| 1278 | + | |
| 1279 | + | |
1278 | 1280 | | |
1279 | 1281 | | |
1280 | 1282 | | |
| |||
9109 | 9111 | | |
9110 | 9112 | | |
9111 | 9113 | | |
9112 | | - | |
9113 | | - | |
| 9114 | + | |
| 9115 | + | |
| 9116 | + | |
9114 | 9117 | | |
9115 | 9118 | | |
9116 | 9119 | | |
| |||
9401 | 9404 | | |
9402 | 9405 | | |
9403 | 9406 | | |
9404 | | - | |
9405 | | - | |
| 9407 | + | |
| 9408 | + | |
| 9409 | + | |
9406 | 9410 | | |
9407 | 9411 | | |
9408 | 9412 | | |
| |||
9622 | 9626 | | |
9623 | 9627 | | |
9624 | 9628 | | |
9625 | | - | |
9626 | | - | |
| 9629 | + | |
| 9630 | + | |
| 9631 | + | |
9627 | 9632 | | |
9628 | 9633 | | |
9629 | 9634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments