Commit d2bf202
authored
Remove incorrect assertion in IRBuilder (#8177)
IRBuilder has to handle the case where a branching instruction like
br_on_null sends a value to its target label, even though we cannot
directly represent such a value being sent in our IR. To do so, it adds
an extra trampoline label that fetches the sent value out of scratch
locals before branching to the original target.
We previously had an assertion that the scratch local used to hold such
extra values had the same type as the expression with the destination
label. This is usually true, but it is possible that the destination
label is on an If with an unreachable condition, in which case the
destination has type unreachable and the scratch local has the original
concrete label type. Remove the incorrect assertion.
Fixes #8096.1 parent 63bf811 commit d2bf202
2 files changed
+61
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
1169 | | - | |
1170 | 1169 | | |
1171 | 1170 | | |
1172 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5139 | 5139 | | |
5140 | 5140 | | |
5141 | 5141 | | |
5142 | | - | |
| 5142 | + | |
5143 | 5143 | | |
5144 | 5144 | | |
5145 | 5145 | | |
| |||
5168 | 5168 | | |
5169 | 5169 | | |
5170 | 5170 | | |
| 5171 | + | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
| 5175 | + | |
| 5176 | + | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
| 5187 | + | |
| 5188 | + | |
| 5189 | + | |
| 5190 | + | |
| 5191 | + | |
| 5192 | + | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
| 5200 | + | |
| 5201 | + | |
| 5202 | + | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
| 5209 | + | |
| 5210 | + | |
| 5211 | + | |
| 5212 | + | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
| 5217 | + | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + | |
| 5221 | + | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
| 5225 | + | |
| 5226 | + | |
| 5227 | + | |
| 5228 | + | |
| 5229 | + | |
| 5230 | + | |
5171 | 5231 | | |
5172 | 5232 | | |
5173 | 5233 | | |
| |||
0 commit comments