Commit a4d6c7d
[InstSimplify] Fold LoadInst for uniform constant global variables
Fold LoadInst for uniformly initialized constants, even if there
are non-constant GEP indices.
Goal proof: https://alive2.llvm.org/ce/z/oZtVby
Motivated by rust-lang/rust#107208
Differential Revision: https://reviews.llvm.org/D1441841 parent 78cd158 commit a4d6c7d
File tree
2 files changed
+8
-7
lines changed- llvm
- lib/Analysis
- test/Transforms/InstSimplify
2 files changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6586 | 6586 | | |
6587 | 6587 | | |
6588 | 6588 | | |
| 6589 | + | |
| 6590 | + | |
| 6591 | + | |
| 6592 | + | |
| 6593 | + | |
| 6594 | + | |
6589 | 6595 | | |
6590 | 6596 | | |
6591 | 6597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
| |||
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
| |||
0 commit comments