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
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;