Commit e2ef66f
committed
[HLSL] prevent phi codgen of isTokenLike types
fixes #161754
When the GVN pass is PerformLoadPRE we need to check if it might be
doing this load on a token like type. This is because if we don't
GVN will use the SSAUpdater to insert a phi node to reduce duplicate
resource.getpointer calls.
Because in an earlier commit: 01c0a84
we made the verifier error with `PHI nodes cannot have token type!`
This test case will fail today if we try to perform this load
optimization
https://godbolt.org/z/xM69fY8zM1 parent c7d776b commit e2ef66f
File tree
2 files changed
+37
-0
lines changed- llvm
- lib/Transforms/Scalar
- test/Transforms/GVN/PRE
2 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
1662 | 1665 | | |
1663 | 1666 | | |
1664 | 1667 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments