aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2015-12-16 23:21:30 +0000
committerDerek Schuff <dschuff@google.com>2015-12-16 23:21:30 +0000
commit8bb5f2927a36d1ec58b5fa090095ed0abfa5d1c6 (patch)
treee483943c93115cc76b03307adac8e5b4312d3d37 /llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
parent433049f87b711db1adedac3fc35f6f894ede79ed (diff)
downloadllvm-8bb5f2927a36d1ec58b5fa090095ed0abfa5d1c6.zip
llvm-8bb5f2927a36d1ec58b5fa090095ed0abfa5d1c6.tar.gz
llvm-8bb5f2927a36d1ec58b5fa090095ed0abfa5d1c6.tar.bz2
[WebAssembly] Implement eliminateCallFramePseudo
Summary: Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN pseudo-instructions. Add a test calling a vararg function which causes non-0 adjustments. This revealed an issue with RegisterCoalescer wherein it eliminates a COPY from SP32 to a vreg but failes to update the live ranges of EXPR_STACK, causing a machineinstr verifier failure (so this test is commented out). Also add a dynamic alloca test, which causes a callseq_end dag node with a 0 (instead of undef) second argument to be generated. We currently fail to select that, so adjust the ADJCALLSTACKUP tablegen code to handle it. Differential Revision: http://reviews.llvm.org/D15587 llvm-svn: 255844
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index 597d6f4..2364366 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -445,7 +445,7 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI,
}
if (NumBytes) {
- SDValue Unused = DAG.getUNDEF(PtrVT);
+ SDValue Unused = DAG.getTargetConstant(0, DL, PtrVT);
Chain = DAG.getCALLSEQ_END(Chain, NB, Unused, SDValue(), DL);
}