From 3278313add1c0aea23af915e20e705b673095cef Mon Sep 17 00:00:00 2001 From: Oded Gabbay Date: Sun, 1 May 2016 15:50:27 +0300 Subject: llvmpipe: use VSX for arch rounding when possible Signed-off-by: Oded Gabbay --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index e48c25d074..df6bfeffdd 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1682,7 +1682,7 @@ arch_rounding_available(const struct lp_type type) (type.length == 1 || type.width*type.length == 128)) || (util_cpu_caps.has_avx && type.width*type.length == 256)) return TRUE; - else if ((util_cpu_caps.has_altivec && + else if (((util_cpu_caps.has_altivec || util_cpu_caps.has_vsx) && (type.width == 32 && type.length == 4))) return TRUE; @@ -1792,7 +1792,7 @@ lp_build_round_arch(struct lp_build_context *bld, LLVMValueRef a, enum lp_build_round_mode mode) { - if (util_cpu_caps.has_sse4_1) { + if (util_cpu_caps.has_sse4_1 || util_cpu_caps.has_vsx) { LLVMBuilderRef builder = bld->gallivm->builder; const struct lp_type type = bld->type; const char *intrinsic_root; -- cgit v1.2.3