gallivm: Fix altivec intrinsics for 8xi16 add/sub
authorAdam Jackson <ajax@redhat.com>
Thu, 25 Apr 2013 19:45:38 +0000 (15:45 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 2 May 2013 14:34:08 +0000 (10:34 -0400)
Signed-off-by: Adam Jackson <ajax@redhat.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c

index ec05026e11e94926bad2063e5799c6f253e5dc5b..524a8e79a75633279b3a8337b8a56a09a70d7287 100644 (file)
@@ -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";
          }
       }