CBE: aggregate_init: resolve all operands before processing Liveness

This commit is contained in:
Andrew Kelley 2022-12-03 19:36:26 -07:00
parent 4aae0b09cf
commit aa98517b3e

View File

@ -6244,10 +6244,12 @@ fn airAggregateInit(f: *Function, inst: Air.Inst.Index) !CValue {
const gpa = f.object.dg.gpa;
const resolved_elements = try gpa.alloc(CValue, elements.len);
defer gpa.free(resolved_elements);
for (elements) |element, i| {
resolved_elements[i] = try f.resolveInst(element);
}
{
var bt = iterateBigTomb(f, inst);
for (elements) |element, i| {
resolved_elements[i] = try f.resolveInst(element);
for (elements) |element| {
try bt.feed(element);
}
}