Fix bug updating phi nodes when branching up.

This commit is contained in:
Nick Lewycky
2020-06-01 20:33:37 -07:00
parent c3d26ef639
commit fa3242ce11

View File

@ -1622,7 +1622,7 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
// For each result of the block we're branching to,
// pop a value off the value stack and load it into
// the corresponding phi.
for (phi, value) in frame.phis().iter().zip(values) {
for (phi, value) in phis.iter().zip(values) {
phi.add_incoming(&[(&value, current_block)]);
}