diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index cb33061cf2e..991d4163f72 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1861,9 +1861,10 @@ static bool arch_rounding_available(const struct lp_type type) { if ((util_get_cpu_caps()->has_sse4_1 && - (type.length == 1 || type.width*type.length == 128)) || - (util_get_cpu_caps()->has_avx && type.width*type.length == 256) || - (util_get_cpu_caps()->has_avx512f && type.width*type.length == 512)) + (type.length == 1 || (LLVM_VERSION_MAJOR >= 8 && type.length == 2) || + type.width * type.length == 128)) || + (util_get_cpu_caps()->has_avx && type.width * type.length == 256) || + (util_get_cpu_caps()->has_avx512f && type.width * type.length == 512)) return true; else if ((util_get_cpu_caps()->has_altivec && (type.width == 32 && type.length == 4))) diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index 4c3ef64affe..44d416236dc 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -477,9 +477,10 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned continue; } - if (!util_get_cpu_caps()->has_neon && + if (test->ref == &nearbyintf && length == 2 && + !util_get_cpu_caps()->has_neon && util_get_cpu_caps()->family != CPU_S390X && - test->ref == &nearbyintf && length == 2 && + !(util_get_cpu_caps()->has_sse4_1 && LLVM_VERSION_MAJOR >= 8) && ref != roundf(testval)) { /* FIXME: The generic (non SSE) path in lp_build_iround, which is * always taken for length==2 regardless of native round support,