summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2018-01-04 16:23:11 -0800
committerGitHub <noreply@github.com>2018-01-04 16:23:11 -0800
commit4c55e497d7455f6bbda2567f5535b89de7ce7c69 (patch)
treeab70e8c2faae554ee67233f7a9bd681fc74507e5
parentbbcb50de8d60158067913e27908f43593c8c23c4 (diff)
downloadbinaryen-4c55e497d7455f6bbda2567f5535b89de7ce7c69.tar.gz
binaryen-4c55e497d7455f6bbda2567f5535b89de7ce7c69.tar.bz2
binaryen-4c55e497d7455f6bbda2567f5535b89de7ce7c69.zip
Fix stackAlloc runtime function generation for wasm backend (#1348)
It was returning the top of the allocated space rather than the bottom. Fix taken from @tbfleming in kripken/emscripten#5974
-rw-r--r--src/wasm-emscripten.cpp8
-rw-r--r--test/dot_s/alias.wast19
-rw-r--r--test/dot_s/alternate-lcomm.wast19
-rw-r--r--test/dot_s/asm_const.wast19
-rw-r--r--test/dot_s/basics.wast19
-rw-r--r--test/dot_s/bcp-1.wast19
-rw-r--r--test/dot_s/data-offset-folding.wast19
-rw-r--r--test/dot_s/debug.wast19
-rw-r--r--test/dot_s/dso_handle.wast19
-rw-r--r--test/dot_s/dyncall.wast19
-rw-r--r--test/dot_s/exit.wast19
-rw-r--r--test/dot_s/export_malloc_free.wast19
-rw-r--r--test/dot_s/fix_em_ehsjlj_names.wast19
-rw-r--r--test/dot_s/function-data-sections.wast19
-rw-r--r--test/dot_s/globals.wast19
-rw-r--r--test/dot_s/hostFinalize.wast19
-rw-r--r--test/dot_s/indidx.wast19
-rw-r--r--test/dot_s/indirect-import.wast19
-rw-r--r--test/dot_s/initializers.wast19
-rw-r--r--test/dot_s/lcomm-in-text-segment.wast19
-rw-r--r--test/dot_s/local_align.wast19
-rw-r--r--test/dot_s/macClangMetaData.wast19
-rw-r--r--test/dot_s/memops.wast19
-rw-r--r--test/dot_s/minimal.wast19
-rw-r--r--test/dot_s/permute.wast19
-rw-r--r--test/dot_s/relocation.wast19
-rw-r--r--test/dot_s/return.wast19
-rw-r--r--test/dot_s/start_main0.wast19
-rw-r--r--test/dot_s/start_main2.wast19
-rw-r--r--test/dot_s/symbolic-offset.wast19
-rw-r--r--test/dot_s/text_before_type.wast19
-rw-r--r--test/dot_s/traps.clamp.wast19
-rw-r--r--test/dot_s/traps.js.wast19
-rw-r--r--test/dot_s/traps.wast19
-rw-r--r--test/dot_s/unreachable_blocks.wast19
-rw-r--r--test/dot_s/visibilities.wast19
-rw-r--r--test/llvm_autogenerated/byval.wast19
-rw-r--r--test/llvm_autogenerated/call.wast19
-rw-r--r--test/llvm_autogenerated/cfg-stackify.wast19
-rw-r--r--test/llvm_autogenerated/comparisons_f32.wast19
-rw-r--r--test/llvm_autogenerated/comparisons_f64.wast19
-rw-r--r--test/llvm_autogenerated/comparisons_i32.wast19
-rw-r--r--test/llvm_autogenerated/comparisons_i64.wast19
-rw-r--r--test/llvm_autogenerated/conv.wast19
-rw-r--r--test/llvm_autogenerated/copysign-casts.wast19
-rw-r--r--test/llvm_autogenerated/cpus.wast19
-rw-r--r--test/llvm_autogenerated/dead-vreg.wast19
-rw-r--r--test/llvm_autogenerated/divrem-constant.wast19
-rw-r--r--test/llvm_autogenerated/f32.wast19
-rw-r--r--test/llvm_autogenerated/f64.wast19
-rw-r--r--test/llvm_autogenerated/fast-isel-noreg.wast19
-rw-r--r--test/llvm_autogenerated/fast-isel.wast19
-rw-r--r--test/llvm_autogenerated/frem.wast19
-rw-r--r--test/llvm_autogenerated/func.wast19
-rw-r--r--test/llvm_autogenerated/global.wast19
-rw-r--r--test/llvm_autogenerated/globl.wast19
-rw-r--r--test/llvm_autogenerated/i128.wast19
-rw-r--r--test/llvm_autogenerated/i32-load-store-alignment.wast19
-rw-r--r--test/llvm_autogenerated/i32.wast19
-rw-r--r--test/llvm_autogenerated/i64-load-store-alignment.wast19
-rw-r--r--test/llvm_autogenerated/i64.wast19
-rw-r--r--test/llvm_autogenerated/ident.wast19
-rw-r--r--test/llvm_autogenerated/immediates.wast19
-rw-r--r--test/llvm_autogenerated/indirect-import.wast19
-rw-r--r--test/llvm_autogenerated/irreducible-cfg.wast19
-rw-r--r--test/llvm_autogenerated/legalize.wast19
-rw-r--r--test/llvm_autogenerated/load-ext.wast19
-rw-r--r--test/llvm_autogenerated/load-store-i1.wast19
-rw-r--r--test/llvm_autogenerated/load.wast19
-rw-r--r--test/llvm_autogenerated/lower-em-ehsjlj-options.wast19
-rw-r--r--test/llvm_autogenerated/mem-intrinsics.wast19
-rw-r--r--test/llvm_autogenerated/memory-addr32.wast19
-rw-r--r--test/llvm_autogenerated/negative-base-reg.wast19
-rw-r--r--test/llvm_autogenerated/non-executable-stack.wast19
-rw-r--r--test/llvm_autogenerated/offset.wast19
-rw-r--r--test/llvm_autogenerated/phi.wast19
-rw-r--r--test/llvm_autogenerated/reg-stackify.wast19
-rw-r--r--test/llvm_autogenerated/return-int32.wast19
-rw-r--r--test/llvm_autogenerated/return-void.wast19
-rw-r--r--test/llvm_autogenerated/select.wast19
-rw-r--r--test/llvm_autogenerated/signext-zeroext.wast19
-rw-r--r--test/llvm_autogenerated/store-trunc.wast19
-rw-r--r--test/llvm_autogenerated/store.wast19
-rw-r--r--test/llvm_autogenerated/switch.wast19
-rw-r--r--test/llvm_autogenerated/unreachable.wast19
-rw-r--r--test/llvm_autogenerated/unused-argument.wast19
-rw-r--r--test/llvm_autogenerated/userstack.wast19
-rw-r--r--test/llvm_autogenerated/varargs.wast19
88 files changed, 786 insertions, 875 deletions
diff --git a/src/wasm-emscripten.cpp b/src/wasm-emscripten.cpp
index 14f93cff3..6961fc75f 100644
--- a/src/wasm-emscripten.cpp
+++ b/src/wasm-emscripten.cpp
@@ -83,18 +83,16 @@ void EmscriptenGlueGenerator::generateStackAllocFunction() {
name, std::move(params), i32, { { "1", i32 } }
);
Load* loadStack = generateLoadStackPointer();
- SetLocal* setStackLocal = builder.makeSetLocal(1, loadStack);
- GetLocal* getStackLocal = builder.makeGetLocal(1, i32);
GetLocal* getSizeArg = builder.makeGetLocal(0, i32);
- Binary* sub = builder.makeBinary(SubInt32, getStackLocal, getSizeArg);
+ Binary* sub = builder.makeBinary(SubInt32, loadStack, getSizeArg);
const static uint32_t bitAlignment = 16;
const static uint32_t bitMask = bitAlignment - 1;
Const* subConst = builder.makeConst(Literal(~bitMask));
Binary* maskedSub = builder.makeBinary(AndInt32, sub, subConst);
- Store* storeStack = generateStoreStackPointer(maskedSub);
+ SetLocal* teeStackLocal = builder.makeTeeLocal(1, maskedSub);
+ Store* storeStack = generateStoreStackPointer(teeStackLocal);
Block* block = builder.makeBlock();
- block->list.push_back(setStackLocal);
block->list.push_back(storeStack);
GetLocal* getStackLocal2 = builder.makeGetLocal(1, i32);
block->list.push_back(getStackLocal2);
diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast
index acb13f8f0..812fb94d2 100644
--- a/test/dot_s/alias.wast
+++ b/test/dot_s/alias.wast
@@ -38,19 +38,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast
index b998ca27a..5c6f67a5c 100644
--- a/test/dot_s/alternate-lcomm.wast
+++ b/test/dot_s/alternate-lcomm.wast
@@ -11,19 +11,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast
index 0974c817e..621a9ddc4 100644
--- a/test/dot_s/asm_const.wast
+++ b/test/dot_s/asm_const.wast
@@ -23,19 +23,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
index 57b3b9899..95806d309 100644
--- a/test/dot_s/basics.wast
+++ b/test/dot_s/basics.wast
@@ -107,19 +107,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast
index c75687537..b52a14bb5 100644
--- a/test/dot_s/bcp-1.wast
+++ b/test/dot_s/bcp-1.wast
@@ -319,19 +319,18 @@
)
(func $stackAlloc (; 22 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast
index 78aa96539..7dae9720e 100644
--- a/test/dot_s/data-offset-folding.wast
+++ b/test/dot_s/data-offset-folding.wast
@@ -13,19 +13,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/debug.wast b/test/dot_s/debug.wast
index 6a7d36eac..b6ffc7f29 100644
--- a/test/dot_s/debug.wast
+++ b/test/dot_s/debug.wast
@@ -64,19 +64,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/dso_handle.wast b/test/dot_s/dso_handle.wast
index 7dfb84db2..948cb2562 100644
--- a/test/dot_s/dso_handle.wast
+++ b/test/dot_s/dso_handle.wast
@@ -17,19 +17,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/dyncall.wast b/test/dot_s/dyncall.wast
index 35ee92d9b..a5291eefc 100644
--- a/test/dot_s/dyncall.wast
+++ b/test/dot_s/dyncall.wast
@@ -60,19 +60,18 @@
)
(func $stackAlloc (; 8 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast
index 65fb224cc..69e560300 100644
--- a/test/dot_s/exit.wast
+++ b/test/dot_s/exit.wast
@@ -21,19 +21,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/export_malloc_free.wast b/test/dot_s/export_malloc_free.wast
index 33dbcdfe7..6399d7fb1 100644
--- a/test/dot_s/export_malloc_free.wast
+++ b/test/dot_s/export_malloc_free.wast
@@ -33,19 +33,18 @@
)
(func $stackAlloc (; 7 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/fix_em_ehsjlj_names.wast b/test/dot_s/fix_em_ehsjlj_names.wast
index 28dc00867..a1844306c 100644
--- a/test/dot_s/fix_em_ehsjlj_names.wast
+++ b/test/dot_s/fix_em_ehsjlj_names.wast
@@ -86,19 +86,18 @@
)
(func $stackAlloc (; 12 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast
index 205d815f4..5d34c1472 100644
--- a/test/dot_s/function-data-sections.wast
+++ b/test/dot_s/function-data-sections.wast
@@ -33,19 +33,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/globals.wast b/test/dot_s/globals.wast
index 4e08e3375..d6a07f303 100644
--- a/test/dot_s/globals.wast
+++ b/test/dot_s/globals.wast
@@ -87,19 +87,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/hostFinalize.wast b/test/dot_s/hostFinalize.wast
index b3d30a93f..1e13d5d89 100644
--- a/test/dot_s/hostFinalize.wast
+++ b/test/dot_s/hostFinalize.wast
@@ -21,19 +21,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/indidx.wast b/test/dot_s/indidx.wast
index 105b0faa0..a2cd15a33 100644
--- a/test/dot_s/indidx.wast
+++ b/test/dot_s/indidx.wast
@@ -61,19 +61,18 @@
)
(func $stackAlloc (; 8 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/indirect-import.wast b/test/dot_s/indirect-import.wast
index cd8a13ed6..49a41a574 100644
--- a/test/dot_s/indirect-import.wast
+++ b/test/dot_s/indirect-import.wast
@@ -129,19 +129,18 @@
)
(func $stackAlloc (; 16 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/initializers.wast b/test/dot_s/initializers.wast
index e3e866cc3..5ad48f5b3 100644
--- a/test/dot_s/initializers.wast
+++ b/test/dot_s/initializers.wast
@@ -25,19 +25,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast
index 2f7e3173e..278beee84 100644
--- a/test/dot_s/lcomm-in-text-segment.wast
+++ b/test/dot_s/lcomm-in-text-segment.wast
@@ -12,19 +12,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/local_align.wast b/test/dot_s/local_align.wast
index 046b2b9f6..263bfc20c 100644
--- a/test/dot_s/local_align.wast
+++ b/test/dot_s/local_align.wast
@@ -20,19 +20,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast
index 3dcde706c..f95994e82 100644
--- a/test/dot_s/macClangMetaData.wast
+++ b/test/dot_s/macClangMetaData.wast
@@ -25,19 +25,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast
index acb70e511..a8d9852be 100644
--- a/test/dot_s/memops.wast
+++ b/test/dot_s/memops.wast
@@ -215,19 +215,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast
index ae918b3e5..b2345c57f 100644
--- a/test/dot_s/minimal.wast
+++ b/test/dot_s/minimal.wast
@@ -17,19 +17,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast
index 4ff88947d..021ece15a 100644
--- a/test/dot_s/permute.wast
+++ b/test/dot_s/permute.wast
@@ -12,19 +12,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast
index c528efcae..536caff4a 100644
--- a/test/dot_s/relocation.wast
+++ b/test/dot_s/relocation.wast
@@ -22,19 +22,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/return.wast b/test/dot_s/return.wast
index 8a527b01a..0e60c7a84 100644
--- a/test/dot_s/return.wast
+++ b/test/dot_s/return.wast
@@ -27,19 +27,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/start_main0.wast b/test/dot_s/start_main0.wast
index 79ab8b217..9951ae6eb 100644
--- a/test/dot_s/start_main0.wast
+++ b/test/dot_s/start_main0.wast
@@ -18,19 +18,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/start_main2.wast b/test/dot_s/start_main2.wast
index cd67cdeda..34929e3ff 100644
--- a/test/dot_s/start_main2.wast
+++ b/test/dot_s/start_main2.wast
@@ -28,19 +28,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast
index e9fe0eb0b..4005f6c0c 100644
--- a/test/dot_s/symbolic-offset.wast
+++ b/test/dot_s/symbolic-offset.wast
@@ -20,19 +20,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/text_before_type.wast b/test/dot_s/text_before_type.wast
index 04d8ec806..be2a10102 100644
--- a/test/dot_s/text_before_type.wast
+++ b/test/dot_s/text_before_type.wast
@@ -18,19 +18,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/traps.clamp.wast b/test/dot_s/traps.clamp.wast
index 7228741bb..3add94a93 100644
--- a/test/dot_s/traps.clamp.wast
+++ b/test/dot_s/traps.clamp.wast
@@ -86,19 +86,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/traps.js.wast b/test/dot_s/traps.js.wast
index 2dd71d29a..6982a5289 100644
--- a/test/dot_s/traps.js.wast
+++ b/test/dot_s/traps.js.wast
@@ -38,19 +38,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/traps.wast b/test/dot_s/traps.wast
index e6371fdaf..f417edc25 100644
--- a/test/dot_s/traps.wast
+++ b/test/dot_s/traps.wast
@@ -22,19 +22,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/unreachable_blocks.wast b/test/dot_s/unreachable_blocks.wast
index 43450bb07..00b8183b3 100644
--- a/test/dot_s/unreachable_blocks.wast
+++ b/test/dot_s/unreachable_blocks.wast
@@ -96,19 +96,18 @@
)
(func $stackAlloc (; 11 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast
index 58442bd37..4fc21f8df 100644
--- a/test/dot_s/visibilities.wast
+++ b/test/dot_s/visibilities.wast
@@ -23,19 +23,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast
index d3eeceb1f..ed569a9bb 100644
--- a/test/llvm_autogenerated/byval.wast
+++ b/test/llvm_autogenerated/byval.wast
@@ -189,19 +189,18 @@
)
(func $stackAlloc (; 16 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/call.wast b/test/llvm_autogenerated/call.wast
index dc1d2a443..71f7bb0ea 100644
--- a/test/llvm_autogenerated/call.wast
+++ b/test/llvm_autogenerated/call.wast
@@ -122,19 +122,18 @@
)
(func $stackAlloc (; 22 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast
index b6b29e8ab..236cd2354 100644
--- a/test/llvm_autogenerated/cfg-stackify.wast
+++ b/test/llvm_autogenerated/cfg-stackify.wast
@@ -970,19 +970,18 @@
)
(func $stackAlloc (; 31 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/comparisons_f32.wast b/test/llvm_autogenerated/comparisons_f32.wast
index a46694d64..243a9870d 100644
--- a/test/llvm_autogenerated/comparisons_f32.wast
+++ b/test/llvm_autogenerated/comparisons_f32.wast
@@ -222,19 +222,18 @@
)
(func $stackAlloc (; 15 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/comparisons_f64.wast b/test/llvm_autogenerated/comparisons_f64.wast
index cbc254f9c..b40f14289 100644
--- a/test/llvm_autogenerated/comparisons_f64.wast
+++ b/test/llvm_autogenerated/comparisons_f64.wast
@@ -222,19 +222,18 @@
)
(func $stackAlloc (; 15 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/comparisons_i32.wast b/test/llvm_autogenerated/comparisons_i32.wast
index e55b7c98b..037299597 100644
--- a/test/llvm_autogenerated/comparisons_i32.wast
+++ b/test/llvm_autogenerated/comparisons_i32.wast
@@ -102,19 +102,18 @@
)
(func $stackAlloc (; 11 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/comparisons_i64.wast b/test/llvm_autogenerated/comparisons_i64.wast
index c7764d82b..3a2fea57a 100644
--- a/test/llvm_autogenerated/comparisons_i64.wast
+++ b/test/llvm_autogenerated/comparisons_i64.wast
@@ -102,19 +102,18 @@
)
(func $stackAlloc (; 11 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/conv.wast b/test/llvm_autogenerated/conv.wast
index 7a59f056d..932900911 100644
--- a/test/llvm_autogenerated/conv.wast
+++ b/test/llvm_autogenerated/conv.wast
@@ -223,19 +223,18 @@
)
(func $stackAlloc (; 27 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast
index b1bcb7d9b..f21a52b89 100644
--- a/test/llvm_autogenerated/copysign-casts.wast
+++ b/test/llvm_autogenerated/copysign-casts.wast
@@ -32,19 +32,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast
index fb6b6bd94..b318b0ee0 100644
--- a/test/llvm_autogenerated/cpus.wast
+++ b/test/llvm_autogenerated/cpus.wast
@@ -16,19 +16,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast
index 312b87d3d..8dc99cbf3 100644
--- a/test/llvm_autogenerated/dead-vreg.wast
+++ b/test/llvm_autogenerated/dead-vreg.wast
@@ -103,19 +103,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/divrem-constant.wast b/test/llvm_autogenerated/divrem-constant.wast
index 957048e57..dc3dbdf73 100644
--- a/test/llvm_autogenerated/divrem-constant.wast
+++ b/test/llvm_autogenerated/divrem-constant.wast
@@ -68,19 +68,18 @@
)
(func $stackAlloc (; 9 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/f32.wast b/test/llvm_autogenerated/f32.wast
index 1904cb357..3ff33c85e 100644
--- a/test/llvm_autogenerated/f32.wast
+++ b/test/llvm_autogenerated/f32.wast
@@ -151,19 +151,18 @@
)
(func $stackAlloc (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/f64.wast b/test/llvm_autogenerated/f64.wast
index 50ad8aa54..65dc7ed93 100644
--- a/test/llvm_autogenerated/f64.wast
+++ b/test/llvm_autogenerated/f64.wast
@@ -151,19 +151,18 @@
)
(func $stackAlloc (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/fast-isel-noreg.wast b/test/llvm_autogenerated/fast-isel-noreg.wast
index 2814ca576..591a7b715 100644
--- a/test/llvm_autogenerated/fast-isel-noreg.wast
+++ b/test/llvm_autogenerated/fast-isel-noreg.wast
@@ -40,19 +40,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast
index efe4e1ffc..37acac791 100644
--- a/test/llvm_autogenerated/fast-isel.wast
+++ b/test/llvm_autogenerated/fast-isel.wast
@@ -44,19 +44,18 @@
)
(func $stackAlloc (; 7 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/frem.wast b/test/llvm_autogenerated/frem.wast
index 75c89b620..d96b18ef8 100644
--- a/test/llvm_autogenerated/frem.wast
+++ b/test/llvm_autogenerated/frem.wast
@@ -34,19 +34,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast
index 7fbad243a..234a5f71b 100644
--- a/test/llvm_autogenerated/func.wast
+++ b/test/llvm_autogenerated/func.wast
@@ -55,19 +55,18 @@
)
(func $stackAlloc (; 7 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/global.wast b/test/llvm_autogenerated/global.wast
index 05de7a8ef..c5ebe1bf7 100644
--- a/test/llvm_autogenerated/global.wast
+++ b/test/llvm_autogenerated/global.wast
@@ -44,19 +44,18 @@
)
(func $stackAlloc (; 4 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast
index 09fa247fc..37949a45f 100644
--- a/test/llvm_autogenerated/globl.wast
+++ b/test/llvm_autogenerated/globl.wast
@@ -15,19 +15,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast
index d22b3e8aa..078a7490e 100644
--- a/test/llvm_autogenerated/i128.wast
+++ b/test/llvm_autogenerated/i128.wast
@@ -1015,19 +1015,18 @@
)
(func $stackAlloc (; 32 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast
index a48617132..800e42993 100644
--- a/test/llvm_autogenerated/i32-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i32-load-store-alignment.wast
@@ -172,19 +172,18 @@
)
(func $stackAlloc (; 21 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast
index 63dc81ada..5036a5ca8 100644
--- a/test/llvm_autogenerated/i32.wast
+++ b/test/llvm_autogenerated/i32.wast
@@ -213,19 +213,18 @@
)
(func $stackAlloc (; 24 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast
index d7041e5a8..680e301f2 100644
--- a/test/llvm_autogenerated/i64-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i64-load-store-alignment.wast
@@ -252,19 +252,18 @@
)
(func $stackAlloc (; 31 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast
index ae05aab15..541e17c20 100644
--- a/test/llvm_autogenerated/i64.wast
+++ b/test/llvm_autogenerated/i64.wast
@@ -213,19 +213,18 @@
)
(func $stackAlloc (; 24 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/ident.wast b/test/llvm_autogenerated/ident.wast
index e6ed0e88b..fff883f57 100644
--- a/test/llvm_autogenerated/ident.wast
+++ b/test/llvm_autogenerated/ident.wast
@@ -12,19 +12,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast
index 285ac387d..eb36c61c1 100644
--- a/test/llvm_autogenerated/immediates.wast
+++ b/test/llvm_autogenerated/immediates.wast
@@ -180,19 +180,18 @@
)
(func $stackAlloc (; 29 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/indirect-import.wast b/test/llvm_autogenerated/indirect-import.wast
index cc05dad0b..f92c1d2fd 100644
--- a/test/llvm_autogenerated/indirect-import.wast
+++ b/test/llvm_autogenerated/indirect-import.wast
@@ -129,19 +129,18 @@
)
(func $stackAlloc (; 15 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/irreducible-cfg.wast b/test/llvm_autogenerated/irreducible-cfg.wast
index 0e9c7a3f2..9477798a1 100644
--- a/test/llvm_autogenerated/irreducible-cfg.wast
+++ b/test/llvm_autogenerated/irreducible-cfg.wast
@@ -262,19 +262,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast
index bc4b31728..e96ec54ac 100644
--- a/test/llvm_autogenerated/legalize.wast
+++ b/test/llvm_autogenerated/legalize.wast
@@ -2426,19 +2426,18 @@
)
(func $stackAlloc (; 9 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/load-ext.wast b/test/llvm_autogenerated/load-ext.wast
index f40690f7a..6fb9f6eea 100644
--- a/test/llvm_autogenerated/load-ext.wast
+++ b/test/llvm_autogenerated/load-ext.wast
@@ -92,19 +92,18 @@
)
(func $stackAlloc (; 11 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/load-store-i1.wast b/test/llvm_autogenerated/load-store-i1.wast
index c7b671300..f6bf78c31 100644
--- a/test/llvm_autogenerated/load-store-i1.wast
+++ b/test/llvm_autogenerated/load-store-i1.wast
@@ -78,19 +78,18 @@
)
(func $stackAlloc (; 7 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/load.wast b/test/llvm_autogenerated/load.wast
index 173ca3a37..5208c6b0f 100644
--- a/test/llvm_autogenerated/load.wast
+++ b/test/llvm_autogenerated/load.wast
@@ -44,19 +44,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/lower-em-ehsjlj-options.wast b/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
index 001cbc427..876d5f80e 100644
--- a/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
+++ b/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
@@ -121,19 +121,18 @@
)
(func $stackAlloc (; 14 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast
index 65ab6a7b9..9fd95272a 100644
--- a/test/llvm_autogenerated/mem-intrinsics.wast
+++ b/test/llvm_autogenerated/mem-intrinsics.wast
@@ -191,19 +191,18 @@
)
(func $stackAlloc (; 15 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast
index 180551efa..c1f8c1fe2 100644
--- a/test/llvm_autogenerated/memory-addr32.wast
+++ b/test/llvm_autogenerated/memory-addr32.wast
@@ -27,19 +27,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/negative-base-reg.wast b/test/llvm_autogenerated/negative-base-reg.wast
index bcac0cc1e..1b948c48d 100644
--- a/test/llvm_autogenerated/negative-base-reg.wast
+++ b/test/llvm_autogenerated/negative-base-reg.wast
@@ -39,19 +39,18 @@
)
(func $stackAlloc (; 2 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/non-executable-stack.wast b/test/llvm_autogenerated/non-executable-stack.wast
index e6ed0e88b..fff883f57 100644
--- a/test/llvm_autogenerated/non-executable-stack.wast
+++ b/test/llvm_autogenerated/non-executable-stack.wast
@@ -12,19 +12,18 @@
)
(func $stackAlloc (; 1 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast
index 00fa47e43..c95703a8b 100644
--- a/test/llvm_autogenerated/offset.wast
+++ b/test/llvm_autogenerated/offset.wast
@@ -331,19 +331,18 @@
)
(func $stackAlloc (; 36 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast
index 7ece876cf..a96b6721e 100644
--- a/test/llvm_autogenerated/phi.wast
+++ b/test/llvm_autogenerated/phi.wast
@@ -73,19 +73,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast
index 7a06425c1..9ac918571 100644
--- a/test/llvm_autogenerated/reg-stackify.wast
+++ b/test/llvm_autogenerated/reg-stackify.wast
@@ -602,19 +602,18 @@
)
(func $stackAlloc (; 38 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast
index bca1fd03b..e2313ee11 100644
--- a/test/llvm_autogenerated/return-int32.wast
+++ b/test/llvm_autogenerated/return-int32.wast
@@ -38,19 +38,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast
index 98f45583e..615b5a75e 100644
--- a/test/llvm_autogenerated/return-void.wast
+++ b/test/llvm_autogenerated/return-void.wast
@@ -34,19 +34,18 @@
)
(func $stackAlloc (; 3 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/select.wast b/test/llvm_autogenerated/select.wast
index 6af2dd312..6cc4757ba 100644
--- a/test/llvm_autogenerated/select.wast
+++ b/test/llvm_autogenerated/select.wast
@@ -132,19 +132,18 @@
)
(func $stackAlloc (; 13 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/signext-zeroext.wast b/test/llvm_autogenerated/signext-zeroext.wast
index a3a48cd6b..4b940b235 100644
--- a/test/llvm_autogenerated/signext-zeroext.wast
+++ b/test/llvm_autogenerated/signext-zeroext.wast
@@ -64,19 +64,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast
index 61b82a41e..2aaaea90e 100644
--- a/test/llvm_autogenerated/store-trunc.wast
+++ b/test/llvm_autogenerated/store-trunc.wast
@@ -47,19 +47,18 @@
)
(func $stackAlloc (; 6 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/store.wast b/test/llvm_autogenerated/store.wast
index 2de1adcb9..fdedbcaf0 100644
--- a/test/llvm_autogenerated/store.wast
+++ b/test/llvm_autogenerated/store.wast
@@ -44,19 +44,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast
index 7ea6adf7e..0cde8665d 100644
--- a/test/llvm_autogenerated/switch.wast
+++ b/test/llvm_autogenerated/switch.wast
@@ -97,19 +97,18 @@
)
(func $stackAlloc (; 9 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast
index fc44c2362..6bf8e83fd 100644
--- a/test/llvm_autogenerated/unreachable.wast
+++ b/test/llvm_autogenerated/unreachable.wast
@@ -27,19 +27,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/unused-argument.wast b/test/llvm_autogenerated/unused-argument.wast
index d0382d354..6af562f8c 100644
--- a/test/llvm_autogenerated/unused-argument.wast
+++ b/test/llvm_autogenerated/unused-argument.wast
@@ -33,19 +33,18 @@
)
(func $stackAlloc (; 5 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast
index 4fa702b0e..ec15b03ed 100644
--- a/test/llvm_autogenerated/userstack.wast
+++ b/test/llvm_autogenerated/userstack.wast
@@ -465,19 +465,18 @@
)
(func $stackAlloc (; 18 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)
diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast
index df3ac3e74..4d8d7fed1 100644
--- a/test/llvm_autogenerated/varargs.wast
+++ b/test/llvm_autogenerated/varargs.wast
@@ -194,19 +194,18 @@
)
(func $stackAlloc (; 11 ;) (param $0 i32) (result i32)
(local $1 i32)
- (set_local $1
- (i32.load offset=4
- (i32.const 0)
- )
- )
(i32.store offset=4
(i32.const 0)
- (i32.and
- (i32.sub
- (get_local $1)
- (get_local $0)
+ (tee_local $1
+ (i32.and
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (get_local $0)
+ )
+ (i32.const -16)
)
- (i32.const -16)
)
)
(get_local $1)