LLVM has all the required intrinsics available on IBM Z, so use them for
rounding operations (they will be implemented as a single instruction).
This change makes the test case lp_test_arit pass, because it avoids
using the buggy generic code.
v2: update .gitlab-ci/cross-xfail-s390x to reflect passing lp_test_arit
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13927>
-lp_test_arit
lp_test_format
return TRUE;
else if (util_get_cpu_caps()->has_neon)
return TRUE;
+ else if (util_cpu_caps_has_zarch())
+ return TRUE;
return FALSE;
}
LLVMValueRef a,
enum lp_build_round_mode mode)
{
- if (util_get_cpu_caps()->has_sse4_1 || util_get_cpu_caps()->has_neon) {
+ if (util_get_cpu_caps()->has_sse4_1 || util_get_cpu_caps()->has_neon ||
+ util_cpu_caps_has_zarch()) {
LLVMBuilderRef builder = bld->gallivm->builder;
const struct lp_type type = bld->type;
const char *intrinsic_root;
}
if (!util_get_cpu_caps()->has_neon &&
+ !util_cpu_caps_has_zarch() &&
test->ref == &nearbyintf && length == 2 &&
ref != roundf(testval)) {
/* FIXME: The generic (non SSE) path in lp_build_iround, which is