Skip to content

test_sse1 does not validate as asm.js. #3043

Closed
@juj

Description

@juj

Build the newly merged SSE1 completeness test with

emcc tests/test_sse1.cpp -o a.html -O2 -s PRECISE_F32=1

and run in current Nightly. It will produce a validation error

TypeError: asm.js type error: then/else branches of conditional must both produce int or double, current types are float32x4 and float32x4

If one builds with -g2 flag in addition to above, the error changes to the following:

TypeError: asm.js type error: dot access field must be a lane name (x, y, z, w) or signMask

where the offending line reads

if ((SIMD_float32x4(Math_fround(nan), Math_fround(1.0), Math_fround(0.0), Math_fround(-1.0)).signMaskPolyfill | 0) != 8) {
  _fwrite(2568, 74, 1, HEAP32[_stderr >> 2] | 0) | 0;
  HEAP32[2] = (HEAP32[2] | 0) + 1;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions