From fe252ffdaa62fc676b1bceaaba90652e51f07e5f Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 19 Jun 2017 13:45:41 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305694 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64MacroFusion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/AArch64/AArch64MacroFusion.cpp b/lib/Target/AArch64/AArch64MacroFusion.cpp index 7e97b6ccb48..ccc9d2ad1b4 100644 --- a/lib/Target/AArch64/AArch64MacroFusion.cpp +++ b/lib/Target/AArch64/AArch64MacroFusion.cpp @@ -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); } -- 2.50.1