-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
compiler:inferenceType inferenceType inferencecompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)
Description
In the code snippet below, ideally we want to propagate uw::DataType information to #7:
julia> code_typed((Any,Type); optimize=false) do uw, ti
(uw isa DataType && ti <: uw.name.wrapper) || return nothing
uw
end
1-element Vector{Any}:
CodeInfo(
1 ─ %1 = (uw isa Main.DataType)::Bool
└── goto #3 if not %1
2 ─ %3 = Base.getproperty(uw::DataType, :name)::Core.TypeName
│ %4 = Base.getproperty(%3, :wrapper)::Type
│ (@_4 = ti <: %4)::Bool
└── goto #4
3 ─ (@_4 = false)::Core.Const(false)
4 ┄ %8 = @_4::Bool
└── goto #6 if not %8
5 ─ goto #7
6 ─ return Main.nothing
7 ─ return uw
) => AnyI feel like this can be fixed by a lowering improvement as we did for #39611?
Metadata
Metadata
Assignees
Labels
compiler:inferenceType inferenceType inferencecompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)