diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-29 17:17:25 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-11-30 00:20:49 -0500 |
| commit | deda6b514691c3a7ffc7931469886d0e7be2f67e (patch) | |
| tree | c71ae6f91304fc3d7e68da2fc04fc1fe4154e61f /src/codegen | |
| parent | b8473ae7d333ea2750e55e712722d446076e99d9 (diff) | |
| download | zig-deda6b514691c3a7ffc7931469886d0e7be2f67e.tar.gz zig-deda6b514691c3a7ffc7931469886d0e7be2f67e.zip | |
LLVM: fix canElideLoad behavior with loops
closes #13546
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/llvm.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index bbbcbdd754..64359fe520 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -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 { |
