[PATCH] D62403: check for INLINEASM_BR along w/ INLINEASM

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 09:33:46 PDT 2019


nickdesaulniers created this revision.
nickdesaulniers added a reviewer: hfinkel.
Herald added subscribers: llvm-commits, jsji, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

It looks like since INLINEASM_BR was created off of INLINEASM (r353563),
a few checks for INLINEASM needed to be updated to check for either
case.

pr/41999


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62403

Files:
  llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp


Index: llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+++ llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
@@ -422,6 +422,7 @@
       // of opcodes having a common attribute in TableGen.  Should this
       // change, this is a prime candidate to use such a mechanism.
       case PPC::INLINEASM:
+      case PPC::INLINEASM_BR:
       case PPC::EXTRACT_SUBREG:
       case PPC::INSERT_SUBREG:
       case PPC::COPY_TO_REGCLASS:
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -2013,7 +2013,7 @@
 unsigned PPCInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
   unsigned Opcode = MI.getOpcode();
 
-  if (Opcode == PPC::INLINEASM) {
+  if (Opcode == PPC::INLINEASM || Opcode == PPC::INLINEASM_BR) {
     const MachineFunction *MF = MI.getParent()->getParent();
     const char *AsmStr = MI.getOperand(0).getSymbolName();
     return getInlineAsmLength(AsmStr, *MF->getTarget().getMCAsmInfo());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62403.201273.patch
Type: text/x-patch
Size: 1180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/da8640a5/attachment.bin>


More information about the llvm-commits mailing list