Closed
Bug 1799014
Opened 2 years ago
Closed 2 years ago
f64x2.max produces incorrect result when 0 compared with -0
Categories
(Core :: JavaScript: WebAssembly, defect)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
FIXED
108 Branch
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: yury, Assigned: yury)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The script case below outputs 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,128
:
const wasm = wasmTextToBinary(`(module
(memory (export "memory") 1 1)
(func (export "f64x2.max") (param v128 v128) (result v128) (f64x2.max (local.get 0) (local.get 1)))
(func (export "f")
i32.const 0
v128.const f64x2 0.0 0.0
v128.const f64x2 -0.0 -0.0
call 0
v128.store)
)`);
const mod = new WebAssembly.Module(wasm);
const ins = new WebAssembly.Instance(mod);
ins.exports.f();
const mem = ins.exports.memory.buffer;
console.log(new Uint8Array(mem, 0, 16));
Expected all 0
Assignee | ||
Comment 1•2 years ago
|
||
Affects only AVX lowering: works as expected with --no-avx
Assignee | ||
Comment 2•2 years ago
|
||
Addresses wrong refactoring/optimization of the
minMaxFloat32x4AVX and minMaxFloat64x2AVX functions.
Testing of this case is covered by spec tests.
(Also to be addressed in bug 1797194)
Updated•2 years ago
|
Assignee: nobody → ydelendik
Status: NEW → ASSIGNED
Pushed by ydelendik@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2a4b5166fd5
Fix f64x2./f32x4.max for AVX cpus. r=rhunt
Comment 4•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox108:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•