diff options
| author | Juergen Ributzka <juergen@apple.com> | 2014-02-12 22:17:10 +0000 |
|---|---|---|
| committer | Juergen Ributzka <juergen@apple.com> | 2014-02-12 22:17:10 +0000 |
| commit | aa30da30bbce42fe0e98a6fcb5ed7a328ab89094 (patch) | |
| tree | 7fd98fd05227282e8173401160cb474b25801e6e | |
| parent | 7f045112673c549248c832e975ced7f9f9bee7dc (diff) | |
| download | bcm5719-llvm-aa30da30bbce42fe0e98a6fcb5ed7a328ab89094.tar.gz bcm5719-llvm-aa30da30bbce42fe0e98a6fcb5ed7a328ab89094.zip | |
[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documenation)
The ID type for the stackmap and patchpoint intrinsics are in both cases i64.
This fixes an zero extend in the SelectionDAGBuilder that still used i32. This
also updates the target independent instructions STACKMAP and PATCHPOINT to use
the correct type.
llvm-svn: 201262
| -rw-r--r-- | llvm/include/llvm/Target/Target.td | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/llvm/include/llvm/Target/Target.td b/llvm/include/llvm/Target/Target.td index fb3e764e5b1..55b65d01350 100644 --- a/llvm/include/llvm/Target/Target.td +++ b/llvm/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/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index bf525796797..4d3684ccedb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/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); |

