Commit ff1a9e4
committed
Fix underflow when calculating the number of no-op jumps folded
When removing unwinds to no-op blocks and folding jumps to no-op blocks,
remove the unwind target first. Otherwise we cannot determine if target
has been already folded or not.
Previous implementation incorrectly assumed that all resume targets had
been folded already, occasionally resulting in an underflow:
remove_noop_landing_pads: removed 18446744073709551613 jumps and 3 landing pads1 parent 90b1f5a commit ff1a9e4
File tree
1 file changed
+10
-9
lines changed- compiler/rustc_mir/src/transform
1 file changed
+10
-9
lines changedLines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
0 commit comments