Fix failures seen on i686 due to relying on exact floating-point
equality when testing results of vector division.
gcc/testsuite/ChangeLog:
* jit.dg/test-vector-rvalues.cc (check_div): Add specialization
for v4f, to avoid relying on exact floating-point equality.
* jit.dg/test-vector-types.cc (check_div): Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
CHECK_VALUE (c[i], a[i] / b[i]);
}
+template <>
+void
+check_div<v4f> (const v4f &a, const v4f &b, const v4f &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_DOUBLE_VALUE (c[i], a[i] / b[i]);
+}
+
template <typename V, typename E>
void
verify_vec_code (gcc_jit_context *ctxt, gcc_jit_result *result,
CHECK_VALUE (c[i], a[i] / b[i]);
}
+template <>
+void
+check_div<v4f> (const v4f &a, const v4f &b, const v4f &c)
+{
+ for (int i = 0; i < 4; i++)
+ CHECK_DOUBLE_VALUE (c[i], a[i] / b[i]);
+}
+
template <typename T>
void
verify_vec_code (gcc_jit_context *ctxt, gcc_jit_result *result,