Add a test with a fixed register constraint.

Make sure we use the diverted register location for tied operands.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-05 11:14:08 -07:00
parent c75004339b
commit 9a7ee4ca12
2 changed files with 15 additions and 1 deletions

View File

@@ -371,7 +371,8 @@ impl<'a> Context<'a> {
for (op, lv) in constraints.outs.iter().zip(defs) {
if let ConstraintKind::Tied(num) = op.kind {
let arg = dfg.inst_args(inst)[num as usize];
locations[lv.value] = locations[arg];
let reg = self.divert.reg(arg, locations);
locations[lv.value] = ValueLoc::Reg(reg);
}
}
}