[AArch64] Fix order of checks in shouldScheduleAdjacent.

We need to check the opcode of FirstMI before accessing the operands. This
caused a buildbot failure during bootstrapping on AArch64.

llvm-svn: 305694
This commit is contained in:
Florian Hahn 2017-06-19 13:45:41 +00:00
parent 48bed53918
commit fd44ca6c76
1 changed files with 2 additions and 2 deletions

View File

@ -144,8 +144,8 @@ static bool shouldScheduleAdjacent(const TargetInstrInfo &TII,
return FirstOpcode == AArch64::INSTRUCTION_LIST_END ||
(FirstOpcode == AArch64::MOVZXi &&
SecondMI.getOperand(3).getImm() == 16) ||
(FirstMI->getOperand(3).getImm() == 32 &&
FirstOpcode == AArch64::MOVKXi &&
(FirstOpcode == AArch64::MOVKXi &&
FirstMI->getOperand(3).getImm() == 32 &&
SecondMI.getOperand(3).getImm() == 48);
}