From 18d9685eb3bb3cd6e642a28412d69e5939ee7732 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 13 Jul 2022 10:51:07 -0500 Subject: [PATCH] Fix pretty print of `atomic_rmw` clif ops (#4441) A comma was accidentally placed after the operation itself when no comma is necessary (only after operands, not the operation itself). --- cranelift/codegen/src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cranelift/codegen/src/write.rs b/cranelift/codegen/src/write.rs index 51b2235db5..d0b6ad8132 100644 --- a/cranelift/codegen/src/write.rs +++ b/cranelift/codegen/src/write.rs @@ -380,7 +380,7 @@ pub fn write_operands(w: &mut dyn Write, dfg: &DataFlowGraph, inst: Inst) -> fmt let pool = &dfg.value_lists; use crate::ir::instructions::InstructionData::*; match dfg[inst] { - AtomicRmw { op, args, .. } => write!(w, " {}, {}, {}", op, args[0], args[1]), + AtomicRmw { op, args, .. } => write!(w, " {} {}, {}", op, args[0], args[1]), AtomicCas { args, .. } => write!(w, " {}, {}, {}", args[0], args[1], args[2]), LoadNoOffset { flags, arg, .. } => write!(w, "{} {}", flags, arg), StoreNoOffset { flags, args, .. } => write!(w, "{} {}, {}", flags, args[0], args[1]),