Skip to content

Commit 1be8fc6

Browse files
committed
Fix another flattening bug
1 parent 120e140 commit 1be8fc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/analysis/structural.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,14 @@ function _structural_analysis!(ci::CodeInstance, world::UInt, settings::Settings
380380
new_call = insert_instruction_here!(compact, settings, @__SOURCE__,
381381
NewInstruction(Expr(:invoke, (StructuralSSARef(compact.result_idx), callee_codeinst), new_args...), stmtype, info, line, stmtflags))
382382
compact.ssa_rename[compact.idx - 1] = new_call
383+
ssa = StructuralSSARef(new_call.id)
384+
else
385+
ssa = StructuralSSARef(i)
383386
end
384387

385388
cms = CallerMappingState(result, refiner.var_to_diff, refiner.varclassification, refiner.varkinds, eqclassification, eqkinds)
386389
err = add_internal_equations_to_structure!(refiner, cms, total_incidence, eq_callee_mapping,
387-
StructuralSSARef(i), result, mapping)
390+
ssa, result, mapping)
388391
if err !== true
389392
return UncompilableIPOResult(warnings, UnsupportedIRException(err, ir))
390393
end

0 commit comments

Comments
 (0)