diff options
author | Max Graey <maxgraey@gmail.com> | 2022-09-20 22:32:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 12:32:34 -0700 |
commit | 4d22e2eac0eb4dfb2793ce0399f3c1a828d6544a (patch) | |
tree | 747664a159d64056c235e27b4cd5bee34e323d87 /test/passes/optimize-instructions_fuzz-exec.txt | |
parent | 32e0fed9e6619d52dee8c3b1f256d812cf115cb0 (diff) | |
download | binaryen-4d22e2eac0eb4dfb2793ce0399f3c1a828d6544a.tar.gz binaryen-4d22e2eac0eb4dfb2793ce0399f3c1a828d6544a.tar.bz2 binaryen-4d22e2eac0eb4dfb2793ce0399f3c1a828d6544a.zip |
[OptimizeInstructions] Simplify add / sub with negative on LHS or RHS for floating points (#5034)
```
(-x) + y -> y - x
x + (-y) -> x - y
x - (-y) -> x + y
```
Diffstat (limited to 'test/passes/optimize-instructions_fuzz-exec.txt')
-rw-r--r-- | test/passes/optimize-instructions_fuzz-exec.txt | 61 |
1 files changed, 10 insertions, 51 deletions
diff --git a/test/passes/optimize-instructions_fuzz-exec.txt b/test/passes/optimize-instructions_fuzz-exec.txt index 33a3945dc..53f5b848e 100644 --- a/test/passes/optimize-instructions_fuzz-exec.txt +++ b/test/passes/optimize-instructions_fuzz-exec.txt @@ -38,20 +38,10 @@ (export "ignore" (func $3)) (func $0 (call $logf32 - (f32.add - (f32.const -nan:0x7fff82) - (f32.neg - (f32.const -nan:0x7ff622) - ) - ) + (f32.const nan:0x400000) ) (call $logf32 - (f32.sub - (f32.const -nan:0x7fff82) - (f32.neg - (f32.const -nan:0x7ff622) - ) - ) + (f32.const nan:0x400000) ) (call $logf32 (f32.mul @@ -81,20 +71,10 @@ ) (func $1 (call $logf64 - (f64.add - (f64.const -nan:0xfffffffffff82) - (f64.neg - (f64.const -nan:0xfffffffffa622) - ) - ) + (f64.const nan:0x8000000000000) ) (call $logf64 - (f64.sub - (f64.const -nan:0xfffffffffff82) - (f64.neg - (f64.const -nan:0xfffffffffa622) - ) - ) + (f64.const nan:0x8000000000000) ) (call $logf64 (f64.mul @@ -124,51 +104,30 @@ ) (func $2 (call $logf32 - (f32.add - (f32.neg - (f32.const -nan:0x7ff622) - ) - (f32.const 0) - ) + (f32.const nan:0x400000) ) (call $logf32 (f32.add (f32.const -nan:0x7ff622) - (f32.neg - (f32.const 0) - ) + (f32.const -0) ) ) (call $logf32 - (f32.add - (f32.neg - (f32.const -nan:0x7ff622) - ) - (f32.const -0) - ) + (f32.const nan:0x400000) ) (call $logf32 (f32.add (f32.const -nan:0x7ff622) - (f32.neg - (f32.const -0) - ) + (f32.const 0) ) ) (call $logf32 - (f32.add - (f32.neg - (f32.const nan:0x7ff622) - ) - (f32.const 0) - ) + (f32.const nan:0x400000) ) (call $logf32 (f32.add (f32.const nan:0x7ff622) - (f32.neg - (f32.const 0) - ) + (f32.const -0) ) ) ) |