[Mesa-dev] [PATCH] gallivm: Fix altivec intrinsics for 8xi16 add/sub

Jose Fonseca jfonseca at vmware.com
Sat Apr 27 09:23:52 PDT 2013


Looks good to me.

Jose

----- Original Message -----
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  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 ec05026..524a8e7 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
> @@ -378,7 +378,7 @@ lp_build_add(struct lp_build_context *bld,
>             if(type.width == 8)
>                intrinsic = type.sign ? "llvm.ppc.altivec.vaddsbs" :
>                "llvm.ppc.altivec.vaddubs";
>             if(type.width == 16)
> -              intrinsic = type.sign ? "llvm.ppc.altivec.vaddsws" :
> "llvm.ppc.altivec.vadduws";
> +              intrinsic = type.sign ? "llvm.ppc.altivec.vaddshs" :
> "llvm.ppc.altivec.vadduhs";
>           }
>        }
>     
> @@ -655,7 +655,7 @@ lp_build_sub(struct lp_build_context *bld,
>             if(type.width == 8)
>                intrinsic = type.sign ? "llvm.ppc.altivec.vsubsbs" :
>                "llvm.ppc.altivec.vsububs";
>             if(type.width == 16)
> -              intrinsic = type.sign ? "llvm.ppc.altivec.vsubsws" :
> "llvm.ppc.altivec.vsubuws";
> +              intrinsic = type.sign ? "llvm.ppc.altivec.vsubshs" :
> "llvm.ppc.altivec.vsubuhs";
>           }
>        }
>     
> --
> 1.8.2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list