summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions_fuzz-exec.txt
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2022-09-12 23:42:16 +0300
committerGitHub <noreply@github.com>2022-09-12 13:42:16 -0700
commitc7967d81d2d5ed06440044d45ad52158c40ee168 (patch)
treee788fb67bc87ca859845d6813aac4ba29af4af45 /test/passes/optimize-instructions_fuzz-exec.txt
parentaa36fc4f67cf38f097b4c2b4db53b718880f9c3a (diff)
downloadbinaryen-c7967d81d2d5ed06440044d45ad52158c40ee168.tar.gz
binaryen-c7967d81d2d5ed06440044d45ad52158c40ee168.tar.bz2
binaryen-c7967d81d2d5ed06440044d45ad52158c40ee168.zip
[OptimizeInstructions] Simplify floating point ops with NaN on right side (#4985)
x + nan -> nan' x - nan -> nan' x * nan -> nan' x / nan -> nan' min(x, nan) -> nan' max(x, nan) -> nan' where nan' is canonicalized nan of rhs x != nan -> 1 x == nan -> 0 x >= nan -> 0 x <= nan -> 0 x > nan -> 0 x < nan -> 0
Diffstat (limited to 'test/passes/optimize-instructions_fuzz-exec.txt')
-rw-r--r--test/passes/optimize-instructions_fuzz-exec.txt10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/passes/optimize-instructions_fuzz-exec.txt b/test/passes/optimize-instructions_fuzz-exec.txt
index ea32b8916..5a8ae7e5f 100644
--- a/test/passes/optimize-instructions_fuzz-exec.txt
+++ b/test/passes/optimize-instructions_fuzz-exec.txt
@@ -62,10 +62,7 @@
)
)
(call $logf32
- (f32.div
- (f32.const nan:0x7fff82)
- (f32.const -nan:0x7ff622)
- )
+ (f32.const nan:0x400000)
)
(call $logf32
(f32.copysign
@@ -118,10 +115,7 @@
)
)
(call $logf64
- (f64.div
- (f64.const nan:0xfffffffffff82)
- (f64.const -nan:0xfffffffffa622)
- )
+ (f64.const nan:0x8000000000000)
)
(call $logf64
(f64.copysign