LLVM: fix canElideLoad behavior with loops

closes #13546
This commit is contained in:
Andrew Kelley
2022-11-29 17:17:25 -07:00
parent b8473ae7d3
commit deda6b5146
3 changed files with 28 additions and 8 deletions

View File

@@ -8136,7 +8136,10 @@ pub const FuncGen = struct {
.write, .noret, .complex => return false,
.tomb => return true,
}
} else unreachable;
}
// The only way to get here is to hit the end of a loop instruction
// (implicit repeat).
return false;
}
fn airLoad(fg: *FuncGen, body_tail: []const Air.Inst.Index) !?*llvm.Value {