summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhan Jun Liau <zhanjunl@ca.ibm.com>2016-07-07 15:34:46 +0000
committerZhan Jun Liau <zhanjunl@ca.ibm.com>2016-07-07 15:34:46 +0000
commita5d60afc093c68ee2e48096d7fac05bd154db5ed (patch)
treea6e788f94b1b18c8dd7b5f2166cf9515539bbe79
parent25600f39eb4a7082b75c5e1f9b3ba3db6f86e41b (diff)
downloadbcm5719-llvm-a5d60afc093c68ee2e48096d7fac05bd154db5ed.tar.gz
bcm5719-llvm-a5d60afc093c68ee2e48096d7fac05bd154db5ed.zip
[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 llvm-svn: 274761
-rw-r--r--llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index 24217800e5e..d2e2e27f397 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud