summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/SIMD/splat.js
blob: 38eda3085eefc9416b5ca9913933af6b7987cf7f (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() {
    for (var i = 0; i < 150; i++) {
        assertEqX4(SIMD.Int32x4.splat(42),   [42, 42, 42, 42]);
        assertEqX4(SIMD.Float32x4.splat(42), [42, 42, 42, 42]);
        assertEqX4(SIMD.Bool32x4.splat(true), [true, true, true, true]);
        assertEqX4(SIMD.Bool32x4.splat(false), [false, false, false, false]);
    }
}

f();