Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sroa: Don't use unwrapped type for type constraint (JuliaLang#50499)
In SROA, when we lift getfields over branches (ifelse or phi), we try to exclude branches that we know to not contribute by their types. However, we were incorrectly using the `unwrap_unionall`'ed version of the type. Type intersection has a bunch of fallbacks for free typevars, but the results are not necessarily correct (e.g. in the test case where `hasintersect(Wrap1{Wrap{Int}}, Wrap1{Wrap{T}})` gives false). We should ideally get around to just making type-quries for things with free typevars an error, but for now, just fix the particular issue in sroa, by using the non-unwrapped type.
- Loading branch information