[Mesa-dev] [PATCH] gallivm: disable f16c when not using AVX

Nicolai Hähnle nhaehnle at gmail.com
Sat Oct 24 13:43:14 PDT 2015


On 23.10.2015 23:26, sroland at vmware.com wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> f16c intrinsic can only be emitted when AVX is used. So when we disable AVX
> due to forcing 128bit vectors we must not use this intrinsic (depending on
> llvm version, this worked previously because llvm used AVX even when we didn't
> tell it to, however I've seen this fail with llvm 3.3 since
> 718249843b915decf8fccec92e466ac1a6219934 which seems to have the side effect
> of disabling avx in llvm albeit it only touches sse flags really).
> Possibly one day should actually try to use avx even with 128bit vectors...

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

> ---
>   src/gallium/auxiliary/gallivm/lp_bld_init.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> index 017d075..e6eede8 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> @@ -427,6 +427,7 @@ lp_build_init(void)
>          */
>         util_cpu_caps.has_avx = 0;
>         util_cpu_caps.has_avx2 = 0;
> +      util_cpu_caps.has_f16c = 0;
>      }
>
>   #ifdef PIPE_ARCH_PPC_64
>



More information about the mesa-dev mailing list