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).
This commit is contained in:
Alex Crichton
2022-07-13 10:51:07 -05:00
committed by GitHub
parent e31ff9dc67
commit 18d9685eb3

View File

@@ -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]),