summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Target/Target.td4
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp13
2 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td
index fb3e764e5b..55b65d0135 100644
--- a/include/llvm/Target/Target.td
+++ b/include/llvm/Target/Target.td
@@ -814,14 +814,14 @@ def LIFETIME_END : Instruction {
}
def STACKMAP : Instruction {
let OutOperandList = (outs);
- let InOperandList = (ins i32imm:$id, i32imm:$nbytes, variable_ops);
+ let InOperandList = (ins i64imm:$id, i32imm:$nbytes, variable_ops);
let isCall = 1;
let mayLoad = 1;
let usesCustomInserter = 1;
}
def PATCHPOINT : Instruction {
let OutOperandList = (outs unknown:$dst);
- let InOperandList = (ins i32imm:$id, i32imm:$nbytes, unknown:$callee,
+ let InOperandList = (ins i64imm:$id, i32imm:$nbytes, unknown:$callee,
i32imm:$nargs, i32imm:$cc, variable_ops);
let isCall = 1;
let mayLoad = 1;
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index bf52579679..4d3684cced 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6917,12 +6917,13 @@ void SelectionDAGBuilder::visitStackmap(const CallInst &CI) {
// Replace the target specific call node with the stackmap intrinsic.
SmallVector<SDValue, 8> Ops;
- // Add the <id> and <numShadowBytes> constants.
- for (unsigned i = 0; i < 2; ++i) {
- SDValue tmp = getValue(CI.getOperand(i));
- Ops.push_back(DAG.getTargetConstant(
- cast<ConstantSDNode>(tmp)->getZExtValue(), MVT::i32));
- }
+ // Add the <id> and <numBytes> constants.
+ SDValue IDVal = getValue(CI.getOperand(PatchPointOpers::IDPos));
+ Ops.push_back(DAG.getTargetConstant(
+ cast<ConstantSDNode>(IDVal)->getZExtValue(), MVT::i64));
+ SDValue NBytesVal = getValue(CI.getOperand(PatchPointOpers::NBytesPos));
+ Ops.push_back(DAG.getTargetConstant(
+ cast<ConstantSDNode>(NBytesVal)->getZExtValue(), MVT::i32));
// Push live variables for the stack map.
addStackMapLiveVars(CI, 2, Ops, *this);