aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-10-27 01:40:14 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-10-27 03:33:49 -0400
commitb0cf620fe3032d485b581c8ab6239f719ef2cada (patch)
treeebfe07c173767ce05ad52a90dbb0fe0e1b5a0925 /src
parent42bca3e2ee3adcfcdb7282c6eaa60f93ad6625cd (diff)
downloadzig-b0cf620fe3032d485b581c8ab6239f719ef2cada.tar.gz
zig-b0cf620fe3032d485b581c8ab6239f719ef2cada.zip
x86_64: fix `cond_br`
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86_64/CodeGen.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index 8b65f17aea..c18aa94716 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -10627,8 +10627,6 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void {
const else_body = self.air.extra[extra.end + then_body.len ..][0..extra.data.else_body_len];
const liveness_cond_br = self.liveness.getCondBr(inst);
- const reloc = try self.genCondBrMir(cond_ty, cond);
-
// If the condition dies here in this condbr instruction, process
// that death now instead of later as this has an effect on
// whether it needs to be spilled in the branches
@@ -10638,6 +10636,7 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void {
self.scope_generation += 1;
const state = try self.saveState();
+ const reloc = try self.genCondBrMir(cond_ty, cond);
for (liveness_cond_br.then_deaths) |death| try self.processDeath(death);
try self.genBody(then_body);