summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-05-16 19:16:32 +0000
committerDan Gohman <dan433584@gmail.com>2016-05-16 19:16:32 +0000
commit4817a7577c1401be92363813d4a00d5a711ce8ab (patch)
tree5fe4699cd16aba6cc61e76d39004bfbd1f1d20ab /llvm/lib/Target/WebAssembly
parent001bb4155621f9e992ee95d6ea092d3b3adbe4f6 (diff)
downloadbcm5719-llvm-4817a7577c1401be92363813d4a00d5a711ce8ab.tar.gz
bcm5719-llvm-4817a7577c1401be92363813d4a00d5a711ce8ab.zip
[WebAssembly] Mark COPY_LOCAL and TEE_LOCAL instructions has having no side effects.
llvm-svn: 269683
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
index a0ec3698aa5..4b319871cf1 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
@@ -110,6 +110,7 @@ let Defs = [ARGUMENTS] in {
// get_local and set_local are not generated by instruction selection; they
// are implied by virtual register uses and defs.
multiclass LOCAL<WebAssemblyRegClass vt> {
+let hasSideEffects = 0 in {
// COPY_LOCAL is not an actual instruction in wasm, but since we allow
// get_local and set_local to be implicit, we can have a COPY_LOCAL which
// is actually a no-op because all the work is done in the implied
@@ -124,6 +125,7 @@ multiclass LOCAL<WebAssemblyRegClass vt> {
let isAsCheapAsAMove = 1 in
def TEE_LOCAL_#vt : I<(outs vt:$res, vt:$also), (ins vt:$src), [],
"tee_local\t$res, $also, $src">;
+} // hasSideEffects = 0
}
defm : LOCAL<I32>;
defm : LOCAL<I64>;
OpenPOWER on IntegriCloud