[SystemZ] Bugfix in tieOpsIfNeeded()

This function did a check which was broken to see if an opcode requires op0
and op1 to be tied. By chance this is NFC.

Review: Ulrich Weigand
This commit is contained in:
Jonas Paulsson 2020-03-26 12:22:14 +01:00
parent aefec9ed77
commit 8bf9e317e4
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ SystemZShortenInst::SystemZShortenInst(const SystemZTargetMachine &tm)
// Tie operands if MI has become a two-address instruction.
static void tieOpsIfNeeded(MachineInstr &MI) {
if (MI.getDesc().getOperandConstraint(0, MCOI::TIED_TO) &&
if (MI.getDesc().getOperandConstraint(1, MCOI::TIED_TO) == 0 &&
!MI.getOperand(0).isTied())
MI.tieOperands(0, 1);
}