]> granicus.if.org Git - llvm/commitdiff
[AArch64] check for INLINEASM_BR along w/ INLINEASM
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 24 May 2019 19:00:13 +0000 (19:00 +0000)
committerNick Desaulniers <ndesaulniers@google.com>
Fri, 24 May 2019 19:00:13 +0000 (19:00 +0000)
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

lib/Target/AArch64/AArch64InstrInfo.cpp

index 951a4ae0c8e6a29d39006846a615ac63882fca13..c1d3453a498b015ae44dd87304ef61b794a3084e 100644 (file)
@@ -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.