From: Zhan Jun Liau Date: Thu, 7 Jul 2016 15:34:46 +0000 (+0000) Subject: [SystemZ] Fix regression when handling conditional calls X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e58b508db1ce76860cf68fb20775003493bb3586;p=llvm [SystemZ] Fix regression when handling conditional calls Summary: A regression showed up in node.js when handling conditional calls. Fix the regression by recognizing external symbols as a possible operand type in CallJG. Reviewers: koriakin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D22054 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274761 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp index 24217800e5e..d2e2e27f397 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -610,14 +610,14 @@ bool SystemZInstrInfo::PredicateInstruction( return true; } if (Opcode == SystemZ::CallJG) { - const GlobalValue *Global = MI.getOperand(0).getGlobal(); + MachineOperand FirstOp = MI.getOperand(0); const uint32_t *RegMask = MI.getOperand(1).getRegMask(); MI.RemoveOperand(1); MI.RemoveOperand(0); MI.setDesc(get(SystemZ::CallBRCL)); MachineInstrBuilder(*MI.getParent()->getParent(), MI) .addImm(CCValid).addImm(CCMask) - .addGlobalAddress(Global) + .addOperand(FirstOp) .addRegMask(RegMask) .addReg(SystemZ::CC, RegState::Implicit); return true;