From 43dc8db068f65f31cd7cf808429c627b29058582 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 27 Aug 2024 20:04:15 -0700 Subject: [PATCH] print_air: print cond_br branch hints --- src/print_air.zig | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/print_air.zig b/src/print_air.zig index 8e6e21801c..49f7248589 100644 --- a/src/print_air.zig +++ b/src/print_air.zig @@ -791,7 +791,11 @@ const Writer = struct { try w.writeOperand(s, inst, 0, pl_op.operand); if (w.skip_body) return s.writeAll(", ..."); - try s.writeAll(", {\n"); + try s.writeAll(","); + if (extra.data.branch_hints.true != .none) { + try s.print(" {s}", .{@tagName(extra.data.branch_hints.true)}); + } + try s.writeAll(" {\n"); const old_indent = w.indent; w.indent += 2; @@ -806,7 +810,11 @@ const Writer = struct { try w.writeBody(s, then_body); try s.writeByteNTimes(' ', old_indent); - try s.writeAll("}, {\n"); + try s.writeAll("},"); + if (extra.data.branch_hints.false != .none) { + try s.print(" {s}", .{@tagName(extra.data.branch_hints.false)}); + } + try s.writeAll(" {\n"); if (liveness_condbr.else_deaths.len != 0) { try s.writeByteNTimes(' ', w.indent);