summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-02-05 20:57:40 +0000
committerThomas Lively <tlively@google.com>2019-02-05 20:57:40 +0000
commit315056692d67792221810af0adea146a674af151 (patch)
tree9a1dcac5b2078ac2a12498d602f02516b74b941c /llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
parenta53eb79be683120402e7e57aebb47b36fc259066 (diff)
downloadbcm5719-llvm-315056692d67792221810af0adea146a674af151.tar.gz
bcm5719-llvm-315056692d67792221810af0adea146a674af151.zip
[WebAssembly] Lower memmove to memory.copy
Summary: The lowering is identical to the memcpy lowering. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57727 llvm-svn: 353216
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
index a23128f05a3..04be3d7d21e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.cpp
@@ -20,7 +20,7 @@ WebAssemblySelectionDAGInfo::~WebAssemblySelectionDAGInfo() = default; // anchor
SDValue WebAssemblySelectionDAGInfo::EmitTargetCodeForMemcpy(
SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Op1, SDValue Op2,
- SDValue Op3, unsigned Align, bool isVolatile, bool AlwaysInline,
+ SDValue Op3, unsigned Align, bool IsVolatile, bool AlwaysInline,
MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const {
if (!DAG.getMachineFunction()
.getSubtarget<WebAssemblySubtarget>()
@@ -30,3 +30,12 @@ SDValue WebAssemblySelectionDAGInfo::EmitTargetCodeForMemcpy(
return DAG.getNode(WebAssemblyISD::MEMORY_COPY, DL, MVT::Other, Chain, Op1,
Op2, Op3);
}
+
+SDValue WebAssemblySelectionDAGInfo::EmitTargetCodeForMemmove(
+ SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, SDValue Op1, SDValue Op2,
+ SDValue Op3, unsigned Align, bool IsVolatile,
+ MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const {
+ return EmitTargetCodeForMemcpy(DAG, DL, Chain, Op1, Op2, Op3, Align,
+ IsVolatile, false, DstPtrInfo,
+ SrcPtrInfo);
+}
OpenPOWER on IntegriCloud