From: Adam Jackson Date: Thu, 25 Apr 2013 19:45:38 +0000 (-0400) Subject: gallivm: Fix altivec intrinsics for 8xi16 add/sub X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16296cc843ef82dd0a7e345b377fbc4535f9e519;p=mesa.git gallivm: Fix altivec intrinsics for 8xi16 add/sub Signed-off-by: Adam Jackson --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index ec05026e11e..524a8e79a75 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"; } }