diff options
author | Matt Turner <[email protected]> | 2019-01-22 15:06:38 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2019-01-24 11:07:24 -0800 |
commit | 70a7ece035785978167fe0019b6ff603415b1f3b (patch) | |
tree | 473c4590a37e5af830a9ecad2e95baf5202f01ab /src/gallium/auxiliary | |
parent | 385ee7c3d0536424eb9822fe873d4410b831cbfe (diff) |
gallivm: Return true from arch_rounding_available() if NEON is available
LLVM uses the single instruction "FRINTI" to implement llvm.nearbyint.
Fixes the rounding tests of lp_test_arit.
Bug: https://bugs.gentoo.org/665570
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_arit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index c050bfdb936..057c50ed278 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1992,6 +1992,8 @@ arch_rounding_available(const struct lp_type type) else if ((util_cpu_caps.has_altivec && (type.width == 32 && type.length == 4))) return TRUE; + else if (util_cpu_caps.has_neon) + return TRUE; return FALSE; } @@ -2099,7 +2101,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_neon) { LLVMBuilderRef builder = bld->gallivm->builder; const struct lp_type type = bld->type; const char *intrinsic_root; |