From 4817a7577c1401be92363813d4a00d5a711ce8ab Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 16 May 2016 19:16:32 +0000 Subject: [WebAssembly] Mark COPY_LOCAL and TEE_LOCAL instructions has having no side effects. llvm-svn: 269683 --- llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td') 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 { +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 { 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; defm : LOCAL; -- cgit v1.2.3