From 2f100f6cf7cc71756a0d8211a30dabe421e264ef Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Fri, 31 May 2019 23:02:13 +0000 Subject: [PATCH] [PowerPC] check for INLINEASM_BR along w/ INLINEASM Summary: 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 Reviewers: hfinkel Reviewed By: hfinkel Subscribers: nemanjai, hiraditya, kbarton, jsji, llvm-commits, craig.topper, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D62403 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362278 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCInstrInfo.cpp | 2 +- lib/Target/PowerPC/PPCVSXSwapRemoval.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index 25f4c9aa8eb..cacbe4eecc5 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -2013,7 +2013,7 @@ bool PPCInstrInfo::optimizeCompareInstr(MachineInstr &CmpInstr, unsigned SrcReg, 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()); diff --git a/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp b/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp index b1ddbb6b837..44175af7f9b 100644 --- a/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp +++ b/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp @@ -422,6 +422,7 @@ bool PPCVSXSwapRemoval::gatherVectorInstructions() { // 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: -- 2.50.1