128219Smsmith/* { dg-do run } */ 228219Smsmith/* { dg-options "-O2 -msse" } */ 328219Smsmith/* { dg-require-effective-target sse } */ 428219Smsmith 528219Smsmith#ifndef CHECK_H 628219Smsmith#define CHECK_H "sse-check.h" 728219Smsmith#endif 828219Smsmith 928219Smsmith#ifndef TEST 1028219Smsmith#define TEST sse_test 1128219Smsmith#endif 1228219Smsmith 1328219Smsmith#include CHECK_H 1428219Smsmith 1528219Smsmith#include <xmmintrin.h> 1628219Smsmith 1728219Smsmithstatic __m128 1828219Smsmith__attribute__((noinline, unused)) 1928219Smsmithtest (__m128 s1, __m128 s2) 2028219Smsmith{ 2128219Smsmith return _mm_mul_ss (s1, s2); 2228219Smsmith} 2328219Smsmith 2428219Smsmithstatic void 2528219SmsmithTEST (void) 2628219Smsmith{ 2728219Smsmith union128 u, s1, s2; 2828219Smsmith float e[4]; 2928219Smsmith 3028219Smsmith s1.x = _mm_set_ps (41124.234,6678.346,8653.65635,856.43576); 3128219Smsmith s2.x = _mm_set_ps (2134.3343,6678.346,453.345635,54646.464356); 3228219Smsmith u.x = test (s1.x, s2.x); 3328219Smsmith 3428219Smsmith e[0] = s1.a[0] * s2.a[0]; 3528219Smsmith e[1] = s1.a[1]; 3628219Smsmith e[2] = s1.a[2]; 3728219Smsmith e[3] = s1.a[3]; 3828219Smsmith 3928219Smsmith if (check_union128 (u, e)) 4028219Smsmith abort (); 4128219Smsmith} 4228219Smsmith