Skip to content

Commit

Permalink
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
@@ -1000,7 +1000,11 @@ function process_node!(compact::IncrementalCompact, result_idx::Int, inst::Instr
elseif isa(stmt, GotoNode) && compact.cfg_transforms_enabled
result[result_idx][:inst] = GotoNode(compact.bb_rename_succ[stmt.label])
result_idx += 1
elseif isa(stmt, GlobalRef) || isa(stmt, GotoNode)
elseif isa(stmt, GlobalRef)
result[result_idx][:inst] = stmt
result[result_idx][:type] = argextype(stmt, compact)
result_idx += 1
elseif isa(stmt, GotoNode)
result[result_idx][:inst] = stmt
result_idx += 1
elseif isa(stmt, GotoIfNot) && compact.cfg_transforms_enabled
12 changes: 12 additions & 0 deletions test/compiler/inline.jl
Original file line number Diff line number Diff line change
@@ -1069,3 +1069,15 @@ end
@test fully_eliminated() do
issue41694(2)
end

global x44200::Int = 0
function f44200()
global x = 0
while x < 10
x += 1
end
x
end
let src = code_typed1(f44200)
@test count(x -> isa(x, Core.PiNode), src.code) == 0
end

0 comments on commit 39e849a

Please sign in to comment.