diff options
author | Alon Zakai <azakai@google.com> | 2020-12-11 08:32:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 08:32:02 -0800 |
commit | 290147d8d43a7448d68939ec711b524ba4fb3fbd (patch) | |
tree | e5403fd0fe2d3008186f79240a5ec9a1518615c5 /test/passes/O1_fuzz-exec_all-features.wast | |
parent | e16cf5818de5a6e37ffcbce0bcde320290d9f9f1 (diff) | |
download | binaryen-290147d8d43a7448d68939ec711b524ba4fb3fbd.tar.gz binaryen-290147d8d43a7448d68939ec711b524ba4fb3fbd.tar.bz2 binaryen-290147d8d43a7448d68939ec711b524ba4fb3fbd.zip |
[GC] Fix Array optimization issues (#3438)
Precompute still tried to precompute a reference because the check was
not in the topmost place.
Also we truncated i8/i16 values, but did not extend them properly. That
was also an issue with structs.
The new test replaces the old one by moving from -O1 to -Oz (which
runs more opts, and would have noticed this earlier), and adds array
operations too, including sign extends.
Diffstat (limited to 'test/passes/O1_fuzz-exec_all-features.wast')
-rw-r--r-- | test/passes/O1_fuzz-exec_all-features.wast | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/test/passes/O1_fuzz-exec_all-features.wast b/test/passes/O1_fuzz-exec_all-features.wast deleted file mode 100644 index 0740e60e7..000000000 --- a/test/passes/O1_fuzz-exec_all-features.wast +++ /dev/null @@ -1,37 +0,0 @@ -(module - (type $struct (struct i32)) - (import "fuzzing-support" "log-i32" (func $log (param i32))) - (func "structs" - (local $x (ref null $struct)) - (local $y (ref null $struct)) - (local.set $x - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) - ) - ;; The value is initialized to 0 - (call $log - (struct.get $struct 0 (local.get $x)) - ) - ;; Assigning a value works - (struct.set $struct 0 - (local.get $x) - (i32.const 42) - ) - (call $log - (struct.get $struct 0 (local.get $x)) - ) - ;; References are references, so writing to one's value affects the other's - (local.set $y (local.get $x)) - (struct.set $struct 0 - (local.get $y) - (i32.const 100) - ) - (call $log - (struct.get $struct 0 (local.get $x)) - ) - (call $log - (struct.get $struct 0 (local.get $y)) - ) - ) -) |