-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
compiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native code
Description
This accounts for the difference observed in #53512 (comment), since somewhere between 1.9 and 1.10 we stopped wrapping those buggy ϕ's in Core.Compiler.MaybeUndef()
.
MWE:
julia> include("test/compiler/irutils.jl")
make_ircode (generic function with 1 method)
julia> let code = Any[
# block 1
#= %1 =# Expr(:call, :opaque),
#= %2 =# Core.GotoIfNot(Core.SSAValue(1), 4),
# block 2
#= %3 =# nothing,
# block 3
#= %4 =# Core.PhiNode(Int32[2,3], Array{Any}(undef, 2)),
#= %5 =# Core.ReturnNode(nothing),
]
ir = make_ircode(code)
ir.stmts.type[4] = Union{}
ir.stmts.flag[4] |= Core.Compiler.IR_FLAG_EFFECT_FREE | Core.Compiler.IR_FLAG_NOTHROW | Core.Compiler.IR_FLAG_CONSISTENT
Core.Compiler.compact!(ir)
end
1 ─ %1 = opaque()::Any │
└── goto #3 if not %1 │
2 ─ nothing::Nothing │
3 ┄ φ (#1 => #undef, #2 => #undef)::Union{} │
└── return nothing
Metadata
Metadata
Assignees
Labels
compiler:codegenGeneration of LLVM IR and native codeGeneration of LLVM IR and native code