Add new SIMD test for asm.js validation with splat() instruction.
This commit is contained in:
Родитель
9c15ddf1ff
Коммит
5633d1eaf9
|
@ -0,0 +1,11 @@
|
|||
#include <xmmintrin.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
bool always_true() { return time(NULL) != 0; } // This function always returns true, but the compiler should not know this.
|
||||
|
||||
int main()
|
||||
{
|
||||
__m128 a = always_true() ? _mm_set1_ps(0.f) : _mm_set1_ps(2.f);
|
||||
printf("%d %d %d %d\n", (int)a[0], (int)a[1], (int)a[2], (int)a[3]);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
0 0 0 0
|
|
@ -5652,6 +5652,16 @@ return malloc(size);
|
|||
|
||||
self.do_run_from_file(src, output)
|
||||
|
||||
def test_simd9(self):
|
||||
# test_simd9 is to test a bug where _mm_set_ps(0.f) would generate an expression that did not validate as asm.js
|
||||
if self.is_emterpreter(): return self.skip('todo')
|
||||
|
||||
test_path = path_from_root('tests', 'core', 'test_simd9')
|
||||
src, output = (test_path + s for s in ('.in', '.out'))
|
||||
|
||||
self.emcc_args = self.emcc_args + ['-msse']
|
||||
self.do_run_from_file(src, output)
|
||||
|
||||
def test_simd_dyncall(self):
|
||||
if self.is_emterpreter(): return self.skip('todo')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче