1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[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 93c2f98ef7
commit 28cfee69f6

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);
}