authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-27 20:04:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-28 18:07:13-07:00
log43dc8db068f65f31cd7cf808429c627b29058582
treed4a2fbd6a585f84aea9ab0c8b14180419c718370
parenta3d622bdd67846cd6600619d41d022a4a08db00a

print_air: print cond_br branch hints


1 files changed, 10 insertions(+), 2 deletions(-)

src/print_air.zig+10-2
......@@ -791,7 +791,11 @@ const Writer = struct {
791791
792792 try w.writeOperand(s, inst, 0, pl_op.operand);
793793 if (w.skip_body) return s.writeAll(", ...");
794 try s.writeAll(", {\n");
794 try s.writeAll(",");
795 if (extra.data.branch_hints.true != .none) {
796 try s.print(" {s}", .{@tagName(extra.data.branch_hints.true)});
797 }
798 try s.writeAll(" {\n");
795799 const old_indent = w.indent;
796800 w.indent += 2;
797801
......@@ -806,7 +810,11 @@ const Writer = struct {
806810
807811 try w.writeBody(s, then_body);
808812 try s.writeByteNTimes(' ', old_indent);
809 try s.writeAll("}, {\n");
813 try s.writeAll("},");
814 if (extra.data.branch_hints.false != .none) {
815 try s.print(" {s}", .{@tagName(extra.data.branch_hints.false)});
816 }
817 try s.writeAll(" {\n");
810818
811819 if (liveness_condbr.else_deaths.len != 0) {
812820 try s.writeByteNTimes(' ', w.indent);