summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/SIMD/bool32x4-arith.js
blob: bafceefa9e6cde0d9240b13384d8353c3df3270e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
load(libdir + "simd.js");

setJitCompilerOption("ion.warmup.trigger", 50);

function f() {
    var b1 = SIMD.Bool32x4(true, false, true, false);
    var b2 = SIMD.Bool32x4(true, true, true, true);
    do {
        assertEqX4(SIMD.Bool32x4.and(b1, b2), booleanBinaryX4((x, y) => x && y, b1, b2));
        assertEqX4(SIMD.Bool32x4.or(b1, b2),  booleanBinaryX4((x, y) => x || y, b1, b2));
        assertEqX4(SIMD.Bool32x4.xor(b1, b2), booleanBinaryX4((x, y) => x != y, b1, b2));
    } while (!inIon());
}

f();