public void DeadComment() { var dead = m.Reg16("dead"); m.Comment("This is a comment"); m.Assign(dead, m.Word16(0xDEAD)); EliminateDeadCode(); var sExp = @" // This is a comment "; AssertProcedureCode(sExp); }
public void VpPhiWithConstants() { var c1 = Constant.Word16(0x4711); var c2 = Constant.Word16(0x4711); var r1 = m.Reg16("r1"); var r2 = m.Reg16("r2"); var r3 = m.Reg16("r3"); m.Assign(r1, c1); m.Assign(r2, c2); var phiStm = m.Phi(r3, (r1, "block1"), (r2, "block2")); RunValuePropagator(); Assert.AreEqual("r3 = 0x4711<16>", phiStm.Instruction.ToString()); }