summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjgravelle-google <jgravelle@google.com>2017-06-28 09:53:37 -0700
committerGitHub <noreply@github.com>2017-06-28 09:53:37 -0700
commit14bcc443282146cb85ef2798c36fcb2fe6fa74fa (patch)
tree9b954ab0ab6b9f87ce752c1b781cf050b9b5f703
parent21e08eeef1ccc489cd06495e4370e1dffccfe088 (diff)
downloadbinaryen-14bcc443282146cb85ef2798c36fcb2fe6fa74fa.tar.gz
binaryen-14bcc443282146cb85ef2798c36fcb2fe6fa74fa.tar.bz2
binaryen-14bcc443282146cb85ef2798c36fcb2fe6fa74fa.zip
Runtime.stackAlloc should grow down for wasm (#1073)
* Runtime.stackAlloc should grow down for wasm * stackAlloc should align properly; update tests
-rw-r--r--src/wasm-emscripten.cpp12
-rw-r--r--test/dot_s/alias.wast9
-rw-r--r--test/dot_s/alternate-lcomm.wast9
-rw-r--r--test/dot_s/asm_const.wast9
-rw-r--r--test/dot_s/basics.wast9
-rw-r--r--test/dot_s/bcp-1.wast9
-rw-r--r--test/dot_s/data-offset-folding.wast9
-rw-r--r--test/dot_s/debug.wast9
-rw-r--r--test/dot_s/dso_handle.wast9
-rw-r--r--test/dot_s/dyncall.wast9
-rw-r--r--test/dot_s/exit.wast9
-rw-r--r--test/dot_s/export_malloc_free.wast9
-rw-r--r--test/dot_s/fix_em_ehsjlj_names.wast9
-rw-r--r--test/dot_s/function-data-sections.wast9
-rw-r--r--test/dot_s/globals.wast9
-rw-r--r--test/dot_s/hostFinalize.wast9
-rw-r--r--test/dot_s/indidx.wast9
-rw-r--r--test/dot_s/indirect-import.wast9
-rw-r--r--test/dot_s/initializers.wast9
-rw-r--r--test/dot_s/lcomm-in-text-segment.wast9
-rw-r--r--test/dot_s/local_align.wast9
-rw-r--r--test/dot_s/macClangMetaData.wast9
-rw-r--r--test/dot_s/memops.wast9
-rw-r--r--test/dot_s/minimal.wast9
-rw-r--r--test/dot_s/permute.wast9
-rw-r--r--test/dot_s/relocation.wast9
-rw-r--r--test/dot_s/return.wast9
-rw-r--r--test/dot_s/start_main0.wast9
-rw-r--r--test/dot_s/start_main2.wast9
-rw-r--r--test/dot_s/symbolic-offset.wast9
-rw-r--r--test/dot_s/text_before_type.wast9
-rw-r--r--test/dot_s/unreachable_blocks.wast9
-rw-r--r--test/dot_s/visibilities.wast9
-rw-r--r--test/llvm_autogenerated/byval.wast9
-rw-r--r--test/llvm_autogenerated/call.wast9
-rw-r--r--test/llvm_autogenerated/cfg-stackify.wast9
-rw-r--r--test/llvm_autogenerated/comparisons_f32.wast9
-rw-r--r--test/llvm_autogenerated/comparisons_f64.wast9
-rw-r--r--test/llvm_autogenerated/comparisons_i32.wast9
-rw-r--r--test/llvm_autogenerated/comparisons_i64.wast9
-rw-r--r--test/llvm_autogenerated/conv.wast9
-rw-r--r--test/llvm_autogenerated/copysign-casts.wast9
-rw-r--r--test/llvm_autogenerated/cpus.wast9
-rw-r--r--test/llvm_autogenerated/dead-vreg.wast9
-rw-r--r--test/llvm_autogenerated/divrem-constant.wast9
-rw-r--r--test/llvm_autogenerated/f32.wast9
-rw-r--r--test/llvm_autogenerated/f64.wast9
-rw-r--r--test/llvm_autogenerated/fast-isel-noreg.wast9
-rw-r--r--test/llvm_autogenerated/fast-isel.wast9
-rw-r--r--test/llvm_autogenerated/frem.wast9
-rw-r--r--test/llvm_autogenerated/func.wast9
-rw-r--r--test/llvm_autogenerated/global.wast9
-rw-r--r--test/llvm_autogenerated/globl.wast9
-rw-r--r--test/llvm_autogenerated/i128.wast9
-rw-r--r--test/llvm_autogenerated/i32-load-store-alignment.wast9
-rw-r--r--test/llvm_autogenerated/i32.wast9
-rw-r--r--test/llvm_autogenerated/i64-load-store-alignment.wast9
-rw-r--r--test/llvm_autogenerated/i64.wast9
-rw-r--r--test/llvm_autogenerated/ident.wast9
-rw-r--r--test/llvm_autogenerated/immediates.wast9
-rw-r--r--test/llvm_autogenerated/indirect-import.wast9
-rw-r--r--test/llvm_autogenerated/irreducible-cfg.wast9
-rw-r--r--test/llvm_autogenerated/legalize.wast9
-rw-r--r--test/llvm_autogenerated/load-ext.wast9
-rw-r--r--test/llvm_autogenerated/load-store-i1.wast9
-rw-r--r--test/llvm_autogenerated/load.wast9
-rw-r--r--test/llvm_autogenerated/lower-em-ehsjlj-options.wast9
-rw-r--r--test/llvm_autogenerated/mem-intrinsics.wast9
-rw-r--r--test/llvm_autogenerated/memory-addr32.wast9
-rw-r--r--test/llvm_autogenerated/negative-base-reg.wast9
-rw-r--r--test/llvm_autogenerated/non-executable-stack.wast9
-rw-r--r--test/llvm_autogenerated/offset.wast9
-rw-r--r--test/llvm_autogenerated/phi.wast9
-rw-r--r--test/llvm_autogenerated/reg-stackify.wast9
-rw-r--r--test/llvm_autogenerated/return-int32.wast9
-rw-r--r--test/llvm_autogenerated/return-void.wast9
-rw-r--r--test/llvm_autogenerated/select.wast9
-rw-r--r--test/llvm_autogenerated/signext-zeroext.wast9
-rw-r--r--test/llvm_autogenerated/store-trunc.wast9
-rw-r--r--test/llvm_autogenerated/store.wast9
-rw-r--r--test/llvm_autogenerated/switch.wast9
-rw-r--r--test/llvm_autogenerated/unreachable.wast9
-rw-r--r--test/llvm_autogenerated/unused-argument.wast9
-rw-r--r--test/llvm_autogenerated/userstack.wast9
-rw-r--r--test/llvm_autogenerated/varargs.wast9
85 files changed, 256 insertions, 512 deletions
diff --git a/src/wasm-emscripten.cpp b/src/wasm-emscripten.cpp
index 43366e410..7463ec594 100644
--- a/src/wasm-emscripten.cpp
+++ b/src/wasm-emscripten.cpp
@@ -119,16 +119,12 @@ void generateStackAllocFunction(LinkerObject& linker) {
SetLocal* setStackLocal = builder.makeSetLocal(1, loadStack);
GetLocal* getStackLocal = builder.makeGetLocal(1, i32);
GetLocal* getSizeArg = builder.makeGetLocal(0, i32);
- Binary* add = builder.makeBinary(AddInt32, getStackLocal, getSizeArg);
+ Binary* sub = builder.makeBinary(SubInt32, getStackLocal, getSizeArg);
const static uint32_t bitAlignment = 16;
const static uint32_t bitMask = bitAlignment - 1;
- Const* addConst = builder.makeConst(Literal(bitMask));
- Binary* maskedAdd = builder.makeBinary(
- AndInt32,
- builder.makeBinary(AddInt32, add, addConst),
- builder.makeConst(Literal(~bitMask))
- );
- Store* storeStack = generateStoreStackPointer(builder, linker, maskedAdd);
+ Const* subConst = builder.makeConst(Literal(~bitMask));
+ Binary* maskedSub = builder.makeBinary(AndInt32, sub, subConst);
+ Store* storeStack = generateStoreStackPointer(builder, linker, maskedSub);
Block* block = builder.makeBlock();
block->list.push_back(setStackLocal);
diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast
index 7e439bccb..9caae0016 100644
--- a/test/dot_s/alias.wast
+++ b/test/dot_s/alias.wast
@@ -43,12 +43,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast
index 625760209..e55247c27 100644
--- a/test/dot_s/alternate-lcomm.wast
+++ b/test/dot_s/alternate-lcomm.wast
@@ -19,12 +19,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast
index 3e9ffce65..2b33a7539 100644
--- a/test/dot_s/asm_const.wast
+++ b/test/dot_s/asm_const.wast
@@ -31,12 +31,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
index abdbaaa5a..8e8191369 100644
--- a/test/dot_s/basics.wast
+++ b/test/dot_s/basics.wast
@@ -112,12 +112,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast
index 1c35fdf76..26448250f 100644
--- a/test/dot_s/bcp-1.wast
+++ b/test/dot_s/bcp-1.wast
@@ -324,12 +324,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast
index 074c8681f..ba95d77c5 100644
--- a/test/dot_s/data-offset-folding.wast
+++ b/test/dot_s/data-offset-folding.wast
@@ -21,12 +21,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/debug.wast b/test/dot_s/debug.wast
index 57079919a..d4431ba4f 100644
--- a/test/dot_s/debug.wast
+++ b/test/dot_s/debug.wast
@@ -71,12 +71,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/dso_handle.wast b/test/dot_s/dso_handle.wast
index cdfc998df..4b6dcb340 100644
--- a/test/dot_s/dso_handle.wast
+++ b/test/dot_s/dso_handle.wast
@@ -25,12 +25,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/dyncall.wast b/test/dot_s/dyncall.wast
index 19f6e00bc..4df0e4b27 100644
--- a/test/dot_s/dyncall.wast
+++ b/test/dot_s/dyncall.wast
@@ -65,12 +65,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast
index 4f585d13c..f5bb40ce1 100644
--- a/test/dot_s/exit.wast
+++ b/test/dot_s/exit.wast
@@ -29,12 +29,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/export_malloc_free.wast b/test/dot_s/export_malloc_free.wast
index 7d601ff21..c0f673e21 100644
--- a/test/dot_s/export_malloc_free.wast
+++ b/test/dot_s/export_malloc_free.wast
@@ -41,12 +41,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/fix_em_ehsjlj_names.wast b/test/dot_s/fix_em_ehsjlj_names.wast
index 429e23494..ea6dd54f4 100644
--- a/test/dot_s/fix_em_ehsjlj_names.wast
+++ b/test/dot_s/fix_em_ehsjlj_names.wast
@@ -91,12 +91,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast
index 64a7a67d4..7cbd428bc 100644
--- a/test/dot_s/function-data-sections.wast
+++ b/test/dot_s/function-data-sections.wast
@@ -41,12 +41,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/globals.wast b/test/dot_s/globals.wast
index 2fe329a8c..b25d63362 100644
--- a/test/dot_s/globals.wast
+++ b/test/dot_s/globals.wast
@@ -95,12 +95,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/hostFinalize.wast b/test/dot_s/hostFinalize.wast
index 79ba6be0e..e1441587a 100644
--- a/test/dot_s/hostFinalize.wast
+++ b/test/dot_s/hostFinalize.wast
@@ -29,12 +29,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/indidx.wast b/test/dot_s/indidx.wast
index 07e636621..9c9e8ca17 100644
--- a/test/dot_s/indidx.wast
+++ b/test/dot_s/indidx.wast
@@ -66,12 +66,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/indirect-import.wast b/test/dot_s/indirect-import.wast
index 8df5e85a5..be52ac330 100644
--- a/test/dot_s/indirect-import.wast
+++ b/test/dot_s/indirect-import.wast
@@ -103,12 +103,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/initializers.wast b/test/dot_s/initializers.wast
index 1c51f433f..b22646eaf 100644
--- a/test/dot_s/initializers.wast
+++ b/test/dot_s/initializers.wast
@@ -33,12 +33,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast
index bbd7d8c48..b2cb0dc3f 100644
--- a/test/dot_s/lcomm-in-text-segment.wast
+++ b/test/dot_s/lcomm-in-text-segment.wast
@@ -20,12 +20,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/local_align.wast b/test/dot_s/local_align.wast
index 1991656fd..b8e867fbb 100644
--- a/test/dot_s/local_align.wast
+++ b/test/dot_s/local_align.wast
@@ -28,12 +28,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast
index 2dd3ff2d2..df585dc54 100644
--- a/test/dot_s/macClangMetaData.wast
+++ b/test/dot_s/macClangMetaData.wast
@@ -33,12 +33,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast
index 5cf90fcc7..176ba5f7a 100644
--- a/test/dot_s/memops.wast
+++ b/test/dot_s/memops.wast
@@ -223,12 +223,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast
index 05c2aafc0..64792d12a 100644
--- a/test/dot_s/minimal.wast
+++ b/test/dot_s/minimal.wast
@@ -25,12 +25,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast
index 9aa6a1d9b..ebe4412a5 100644
--- a/test/dot_s/permute.wast
+++ b/test/dot_s/permute.wast
@@ -20,12 +20,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast
index c05180954..7a72943bb 100644
--- a/test/dot_s/relocation.wast
+++ b/test/dot_s/relocation.wast
@@ -30,12 +30,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/return.wast b/test/dot_s/return.wast
index 95a7cf989..cd88730a8 100644
--- a/test/dot_s/return.wast
+++ b/test/dot_s/return.wast
@@ -35,12 +35,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/start_main0.wast b/test/dot_s/start_main0.wast
index 1ffa0a347..ea8be166d 100644
--- a/test/dot_s/start_main0.wast
+++ b/test/dot_s/start_main0.wast
@@ -24,12 +24,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/start_main2.wast b/test/dot_s/start_main2.wast
index 1b5a2f50e..f5fe7d43d 100644
--- a/test/dot_s/start_main2.wast
+++ b/test/dot_s/start_main2.wast
@@ -27,12 +27,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast
index 7ec41fff9..3f33fecdc 100644
--- a/test/dot_s/symbolic-offset.wast
+++ b/test/dot_s/symbolic-offset.wast
@@ -28,12 +28,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/text_before_type.wast b/test/dot_s/text_before_type.wast
index 29edaa45d..56848daf1 100644
--- a/test/dot_s/text_before_type.wast
+++ b/test/dot_s/text_before_type.wast
@@ -26,12 +26,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/unreachable_blocks.wast b/test/dot_s/unreachable_blocks.wast
index ecaa79014..30f7401e2 100644
--- a/test/dot_s/unreachable_blocks.wast
+++ b/test/dot_s/unreachable_blocks.wast
@@ -104,12 +104,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast
index 4cb94d2ce..c7348f017 100644
--- a/test/dot_s/visibilities.wast
+++ b/test/dot_s/visibilities.wast
@@ -31,12 +31,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast
index cd9b39334..39099917b 100644
--- a/test/llvm_autogenerated/byval.wast
+++ b/test/llvm_autogenerated/byval.wast
@@ -197,12 +197,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/call.wast b/test/llvm_autogenerated/call.wast
index 1f3cbb253..1782a37c4 100644
--- a/test/llvm_autogenerated/call.wast
+++ b/test/llvm_autogenerated/call.wast
@@ -130,12 +130,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast
index 910c29f1a..a1f8370c0 100644
--- a/test/llvm_autogenerated/cfg-stackify.wast
+++ b/test/llvm_autogenerated/cfg-stackify.wast
@@ -978,12 +978,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/comparisons_f32.wast b/test/llvm_autogenerated/comparisons_f32.wast
index 0711f7bd4..b701268db 100644
--- a/test/llvm_autogenerated/comparisons_f32.wast
+++ b/test/llvm_autogenerated/comparisons_f32.wast
@@ -230,12 +230,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/comparisons_f64.wast b/test/llvm_autogenerated/comparisons_f64.wast
index 2b256e57c..f4cf3f501 100644
--- a/test/llvm_autogenerated/comparisons_f64.wast
+++ b/test/llvm_autogenerated/comparisons_f64.wast
@@ -230,12 +230,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/comparisons_i32.wast b/test/llvm_autogenerated/comparisons_i32.wast
index 4cac9bd73..d80074400 100644
--- a/test/llvm_autogenerated/comparisons_i32.wast
+++ b/test/llvm_autogenerated/comparisons_i32.wast
@@ -110,12 +110,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/comparisons_i64.wast b/test/llvm_autogenerated/comparisons_i64.wast
index 213181dfb..45e53b784 100644
--- a/test/llvm_autogenerated/comparisons_i64.wast
+++ b/test/llvm_autogenerated/comparisons_i64.wast
@@ -110,12 +110,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/conv.wast b/test/llvm_autogenerated/conv.wast
index f07ebecca..a7efe3662 100644
--- a/test/llvm_autogenerated/conv.wast
+++ b/test/llvm_autogenerated/conv.wast
@@ -231,12 +231,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast
index 66cd3da05..97a40b018 100644
--- a/test/llvm_autogenerated/copysign-casts.wast
+++ b/test/llvm_autogenerated/copysign-casts.wast
@@ -40,12 +40,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast
index 5d9578354..6c4f01a6f 100644
--- a/test/llvm_autogenerated/cpus.wast
+++ b/test/llvm_autogenerated/cpus.wast
@@ -24,12 +24,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast
index 1f8161302..ec8ee6bb4 100644
--- a/test/llvm_autogenerated/dead-vreg.wast
+++ b/test/llvm_autogenerated/dead-vreg.wast
@@ -111,12 +111,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/divrem-constant.wast b/test/llvm_autogenerated/divrem-constant.wast
index 25a673cef..3716f36e0 100644
--- a/test/llvm_autogenerated/divrem-constant.wast
+++ b/test/llvm_autogenerated/divrem-constant.wast
@@ -76,12 +76,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/f32.wast b/test/llvm_autogenerated/f32.wast
index d62e4e046..7711251ed 100644
--- a/test/llvm_autogenerated/f32.wast
+++ b/test/llvm_autogenerated/f32.wast
@@ -159,12 +159,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/f64.wast b/test/llvm_autogenerated/f64.wast
index f3bcd3d8f..f497c4d63 100644
--- a/test/llvm_autogenerated/f64.wast
+++ b/test/llvm_autogenerated/f64.wast
@@ -159,12 +159,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/fast-isel-noreg.wast b/test/llvm_autogenerated/fast-isel-noreg.wast
index 82486303b..1cf3cfcb9 100644
--- a/test/llvm_autogenerated/fast-isel-noreg.wast
+++ b/test/llvm_autogenerated/fast-isel-noreg.wast
@@ -48,12 +48,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast
index 9bc1fb44c..62ecdcdb8 100644
--- a/test/llvm_autogenerated/fast-isel.wast
+++ b/test/llvm_autogenerated/fast-isel.wast
@@ -52,12 +52,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/frem.wast b/test/llvm_autogenerated/frem.wast
index 31ba4bb50..f1ba930b8 100644
--- a/test/llvm_autogenerated/frem.wast
+++ b/test/llvm_autogenerated/frem.wast
@@ -42,12 +42,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast
index dbd9c39ab..cb5f027d1 100644
--- a/test/llvm_autogenerated/func.wast
+++ b/test/llvm_autogenerated/func.wast
@@ -63,12 +63,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/global.wast b/test/llvm_autogenerated/global.wast
index ccf0da15f..e38d6e328 100644
--- a/test/llvm_autogenerated/global.wast
+++ b/test/llvm_autogenerated/global.wast
@@ -52,12 +52,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast
index b3c547bdb..578ad4a15 100644
--- a/test/llvm_autogenerated/globl.wast
+++ b/test/llvm_autogenerated/globl.wast
@@ -23,12 +23,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast
index 3cc5c0aae..261c1b4fb 100644
--- a/test/llvm_autogenerated/i128.wast
+++ b/test/llvm_autogenerated/i128.wast
@@ -1023,12 +1023,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast
index c084dd3fa..a0fd3cbb4 100644
--- a/test/llvm_autogenerated/i32-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i32-load-store-alignment.wast
@@ -180,12 +180,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast
index 2ee13f2c3..26fdd807a 100644
--- a/test/llvm_autogenerated/i32.wast
+++ b/test/llvm_autogenerated/i32.wast
@@ -221,12 +221,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast
index 5d3d4e963..d1939499f 100644
--- a/test/llvm_autogenerated/i64-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i64-load-store-alignment.wast
@@ -260,12 +260,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast
index 2ffbfc964..ae1513272 100644
--- a/test/llvm_autogenerated/i64.wast
+++ b/test/llvm_autogenerated/i64.wast
@@ -221,12 +221,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/ident.wast b/test/llvm_autogenerated/ident.wast
index 071206e3b..92956c042 100644
--- a/test/llvm_autogenerated/ident.wast
+++ b/test/llvm_autogenerated/ident.wast
@@ -20,12 +20,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast
index 6dce33aeb..3b11eacad 100644
--- a/test/llvm_autogenerated/immediates.wast
+++ b/test/llvm_autogenerated/immediates.wast
@@ -188,12 +188,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/indirect-import.wast b/test/llvm_autogenerated/indirect-import.wast
index f8269e80a..a8e83afad 100644
--- a/test/llvm_autogenerated/indirect-import.wast
+++ b/test/llvm_autogenerated/indirect-import.wast
@@ -103,12 +103,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/irreducible-cfg.wast b/test/llvm_autogenerated/irreducible-cfg.wast
index e01218f1b..cfaf98f9b 100644
--- a/test/llvm_autogenerated/irreducible-cfg.wast
+++ b/test/llvm_autogenerated/irreducible-cfg.wast
@@ -270,12 +270,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast
index b3306d424..93c15f8ca 100644
--- a/test/llvm_autogenerated/legalize.wast
+++ b/test/llvm_autogenerated/legalize.wast
@@ -2434,12 +2434,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/load-ext.wast b/test/llvm_autogenerated/load-ext.wast
index 768d5e539..fcb112fac 100644
--- a/test/llvm_autogenerated/load-ext.wast
+++ b/test/llvm_autogenerated/load-ext.wast
@@ -100,12 +100,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/load-store-i1.wast b/test/llvm_autogenerated/load-store-i1.wast
index 94dc05594..18b27cad1 100644
--- a/test/llvm_autogenerated/load-store-i1.wast
+++ b/test/llvm_autogenerated/load-store-i1.wast
@@ -86,12 +86,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/load.wast b/test/llvm_autogenerated/load.wast
index 20b3bcf68..d2f7c6e13 100644
--- a/test/llvm_autogenerated/load.wast
+++ b/test/llvm_autogenerated/load.wast
@@ -52,12 +52,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/lower-em-ehsjlj-options.wast b/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
index becf166b9..74d6eac14 100644
--- a/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
+++ b/test/llvm_autogenerated/lower-em-ehsjlj-options.wast
@@ -123,12 +123,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast
index 8707407bd..cda6519e4 100644
--- a/test/llvm_autogenerated/mem-intrinsics.wast
+++ b/test/llvm_autogenerated/mem-intrinsics.wast
@@ -199,12 +199,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast
index b81880a6e..e1261d011 100644
--- a/test/llvm_autogenerated/memory-addr32.wast
+++ b/test/llvm_autogenerated/memory-addr32.wast
@@ -35,12 +35,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/negative-base-reg.wast b/test/llvm_autogenerated/negative-base-reg.wast
index b3f17724c..dfd34c7f4 100644
--- a/test/llvm_autogenerated/negative-base-reg.wast
+++ b/test/llvm_autogenerated/negative-base-reg.wast
@@ -47,12 +47,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/non-executable-stack.wast b/test/llvm_autogenerated/non-executable-stack.wast
index 071206e3b..92956c042 100644
--- a/test/llvm_autogenerated/non-executable-stack.wast
+++ b/test/llvm_autogenerated/non-executable-stack.wast
@@ -20,12 +20,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast
index 1d6e903a7..cfed9dddf 100644
--- a/test/llvm_autogenerated/offset.wast
+++ b/test/llvm_autogenerated/offset.wast
@@ -339,12 +339,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast
index 3ed5e4409..68cd84472 100644
--- a/test/llvm_autogenerated/phi.wast
+++ b/test/llvm_autogenerated/phi.wast
@@ -81,12 +81,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast
index 4917dacc2..72fc24373 100644
--- a/test/llvm_autogenerated/reg-stackify.wast
+++ b/test/llvm_autogenerated/reg-stackify.wast
@@ -610,12 +610,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast
index 658133704..fd4e60ca8 100644
--- a/test/llvm_autogenerated/return-int32.wast
+++ b/test/llvm_autogenerated/return-int32.wast
@@ -46,12 +46,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast
index 09da984a6..4e079ac41 100644
--- a/test/llvm_autogenerated/return-void.wast
+++ b/test/llvm_autogenerated/return-void.wast
@@ -42,12 +42,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/select.wast b/test/llvm_autogenerated/select.wast
index f49a78c8a..244c33b90 100644
--- a/test/llvm_autogenerated/select.wast
+++ b/test/llvm_autogenerated/select.wast
@@ -140,12 +140,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/signext-zeroext.wast b/test/llvm_autogenerated/signext-zeroext.wast
index 383af3908..42ac98a17 100644
--- a/test/llvm_autogenerated/signext-zeroext.wast
+++ b/test/llvm_autogenerated/signext-zeroext.wast
@@ -72,12 +72,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast
index b33660666..c4c7adadf 100644
--- a/test/llvm_autogenerated/store-trunc.wast
+++ b/test/llvm_autogenerated/store-trunc.wast
@@ -55,12 +55,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/store.wast b/test/llvm_autogenerated/store.wast
index f1496dd1f..c65267e30 100644
--- a/test/llvm_autogenerated/store.wast
+++ b/test/llvm_autogenerated/store.wast
@@ -52,12 +52,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast
index 43dbf2b99..e6fd3f08b 100644
--- a/test/llvm_autogenerated/switch.wast
+++ b/test/llvm_autogenerated/switch.wast
@@ -105,12 +105,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast
index fc775b2c2..eab3e116b 100644
--- a/test/llvm_autogenerated/unreachable.wast
+++ b/test/llvm_autogenerated/unreachable.wast
@@ -35,12 +35,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/unused-argument.wast b/test/llvm_autogenerated/unused-argument.wast
index 2cfb37f47..cba09c922 100644
--- a/test/llvm_autogenerated/unused-argument.wast
+++ b/test/llvm_autogenerated/unused-argument.wast
@@ -41,12 +41,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast
index be1ada7a6..c11ecca56 100644
--- a/test/llvm_autogenerated/userstack.wast
+++ b/test/llvm_autogenerated/userstack.wast
@@ -473,12 +473,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)
diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast
index 96fc57caf..6fb332452 100644
--- a/test/llvm_autogenerated/varargs.wast
+++ b/test/llvm_autogenerated/varargs.wast
@@ -202,12 +202,9 @@
(i32.store offset=4
(i32.const 0)
(i32.and
- (i32.add
- (i32.add
- (get_local $1)
- (get_local $0)
- )
- (i32.const 15)
+ (i32.sub
+ (get_local $1)
+ (get_local $0)
)
(i32.const -16)
)