julia
0b299865 - Always rewrite GotoIfNot with unreachable branches (#51062)

Commit
2 years ago
Always rewrite GotoIfNot with unreachable branches (#51062) This resolves a regression introduced in https://github.com/JuliaLang/julia/pull/50943#issuecomment-1694198019 That PR requires the Goto/GotoIfNot statements of the IR to correspond 1-1 (in terms of reachability) to the information we get from inference. To make that happen, we have to unconditionally re-write control flow to match the branches that inference ended up actually exploring. The problem is that we were choosing not to do this if the GotoIfNot condition seemed to be maybe-non-Boolean. Thankfully, it turns out that check is unnecessary because Inference when unwrapping conditionals does not consider "true or non-Bool" etc. If it did, we'd instead have to re-write these branches as a `typeassert; goto` to encode the reachability
Author
Loading