Skip to content

Commit 4188e49

Browse files
author
Ian Atol
committed
Minor fixups
1 parent e31d45b commit 4188e49

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

base/compiler/ssair/ir.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -712,17 +712,17 @@ function dominates_ssa(compact::IncrementalCompact, domtree::DomTree, x::AnySSAV
712712
if xb == yb
713713
xinfo = yinfo = nothing
714714
if isa(x, OldSSAValue)
715-
x′ = compact.ssa_rename[x]::SSAValue
715+
x′ = compact.ssa_rename[x.id]::SSAValue
716716
elseif isa(x, NewSSAValue)
717-
xinfo = compact.new_new_nodes.infos[x.id]
717+
xinfo = compact.new_new_nodes.info[x.id]
718718
x′ = SSAValue(xinfo.pos)
719719
else
720720
x′ = x
721721
end
722722
if isa(y, OldSSAValue)
723-
y′ = compact.ssa_rename[y]::SSAValue
723+
y′ = compact.ssa_rename[y.id]::SSAValue
724724
elseif isa(y, NewSSAValue)
725-
yinfo = compact.new_new_nodes.infos[x.id]
725+
yinfo = compact.new_new_nodes.info[y.id]
726726
y′ = SSAValue(yinfo.pos)
727727
else
728728
y′ = y

test/compiler/irpasses.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ let e = Expr(:call, Core.GlobalRef(Base, :arrayset), false, Core.SSAValue(4), Co
843843
end
844844

845845
# Test that SROA doesn't try to forward a previous iteration's SSA value
846-
function sroa_no_forward()
846+
let sroa_no_forward() = begin
847847
res = (0, 0)
848848
for i in 1:5
849849
a = first(res)
@@ -853,5 +853,6 @@ function sroa_no_forward()
853853
end
854854
end
855855
return res
856+
end
857+
@test sroa_no_forward() == (1, 2.0)
856858
end
857-
@test sroa_no_forward() == (1, 2.0)

0 commit comments

Comments
 (0)