From: Nick Desaulniers Date: Fri, 24 May 2019 19:00:13 +0000 (+0000) Subject: [AArch64] check for INLINEASM_BR along w/ INLINEASM X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d5f1f607e4078a6c3700d07dc64ab1136082dad;p=llvm [AArch64] check for INLINEASM_BR along w/ INLINEASM Summary: It looks like since INLINEASM_BR was created off of INLINEASM, a few checks for INLINEASM needed to be updated to check for either case. pr/41999 Reviewers: t.p.northover, peter.smith Reviewed By: peter.smith Subscribers: craig.topper, javed.absar, kristof.beyls, hiraditya, llvm-commits, peter.smith, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D62402 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361661 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64InstrInfo.cpp b/lib/Target/AArch64/AArch64InstrInfo.cpp index 951a4ae0c8e..c1d3453a498 100644 --- a/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -76,8 +76,11 @@ unsigned AArch64InstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { const MachineFunction *MF = MBB.getParent(); const MCAsmInfo *MAI = MF->getTarget().getMCAsmInfo(); - if (MI.getOpcode() == AArch64::INLINEASM) - return getInlineAsmLength(MI.getOperand(0).getSymbolName(), *MAI); + { + auto Op = MI.getOpcode(); + if (Op == AArch64::INLINEASM || Op == AArch64::INLINEASM_BR) + return getInlineAsmLength(MI.getOperand(0).getSymbolName(), *MAI); + } // FIXME: We currently only handle pseudoinstructions that don't get expanded // before the assembly printer.