summaryrefslogtreecommitdiff
path: root/test/use-import-and-drop.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-02-28 11:00:34 -0800
committerGitHub <noreply@github.com>2017-02-28 11:00:34 -0800
commit9607b1b7692edad2fe379ade5ee146132fa5f0d7 (patch)
tree015b2cfc97e482750ad436541e69a687330dbb76 /test/use-import-and-drop.fromasm.no-opts
parent6df76ac7cffc27ed181f26b40b63676bfecb78b2 (diff)
downloadbinaryen-9607b1b7692edad2fe379ade5ee146132fa5f0d7.tar.gz
binaryen-9607b1b7692edad2fe379ade5ee146132fa5f0d7.tar.bz2
binaryen-9607b1b7692edad2fe379ade5ee146132fa5f0d7.zip
asm2wasm import overloading fix (#924)
* asm2wasm should not promote an overloaded import result to f64 if it is a single type and void
Diffstat (limited to 'test/use-import-and-drop.fromasm.no-opts')
-rw-r--r--test/use-import-and-drop.fromasm.no-opts53
1 files changed, 53 insertions, 0 deletions
diff --git a/test/use-import-and-drop.fromasm.no-opts b/test/use-import-and-drop.fromasm.no-opts
new file mode 100644
index 000000000..d7ca6c81d
--- /dev/null
+++ b/test/use-import-and-drop.fromasm.no-opts
@@ -0,0 +1,53 @@
+(module
+ (type $FUNCSIG$ii (func (param i32) (result i32)))
+ (import "env" "setTempRet0" (func $setTempRet0 (param i32) (result i32)))
+ (import "env" "memory" (memory $0 256 256))
+ (import "env" "table" (table 0 0 anyfunc))
+ (import "env" "memoryBase" (global $memoryBase i32))
+ (import "env" "tableBase" (global $tableBase i32))
+ (func $test1 (result i32)
+ (local $$b$1 i32)
+ (local $$x_sroa_0_0_extract_trunc i32)
+ (local $$2 i32)
+ (local $$1$1 i32)
+ (local $$1$0 i32)
+ (return
+ (block i32
+ (drop
+ (call $setTempRet0
+ (i32.or
+ (i32.add
+ (i32.add
+ (i32.mul
+ (get_local $$b$1)
+ (get_local $$x_sroa_0_0_extract_trunc)
+ )
+ (get_local $$2)
+ )
+ (get_local $$1$1)
+ )
+ (i32.and
+ (get_local $$1$1)
+ (i32.const 0)
+ )
+ )
+ )
+ )
+ (i32.or
+ (i32.const 0)
+ (i32.and
+ (get_local $$1$0)
+ (i32.const -1)
+ )
+ )
+ )
+ )
+ )
+ (func $test2
+ (drop
+ (call $setTempRet0
+ (i32.const 10)
+ )
+ )
+ )
+)