Mesa (master): gallivm: Use the wrappers for SSE pack intrinsics.
Keith Whitwell
keithw at kemper.freedesktop.org
Fri Oct 8 16:32:05 UTC 2010
Module: Mesa
Branch: master
Commit: f91b4266c6ca950b267bc8968091c85de8cae032
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f91b4266c6ca950b267bc8968091c85de8cae032
Author: José Fonseca <jfonseca at vmware.com>
Date: Mon Oct 4 17:42:18 2010 +0100
gallivm: Use the wrappers for SSE pack intrinsics.
Fixes assertion failures on LLVM 2.6.
---
src/gallium/auxiliary/gallivm/lp_bld_conv.c | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
index 605eb04..40c6618 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
@@ -306,21 +306,9 @@ lp_build_conv(LLVMBuilderRef builder,
LLVMBuildFMul(builder, src[3], const_255f, ""),
int32_vec_type, "");
-#if HAVE_LLVM >= 0x0207
- lo = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128",
- int16_vec_type, src_int0, src_int1);
- hi = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128",
- int16_vec_type, src_int2, src_int3);
- dst[i] = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packuswb.128",
- dst_vec_type, lo, hi);
-#else
- lo = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128",
- int32_vec_type, src_int0, src_int1);
- hi = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packssdw.128",
- int32_vec_type, src_int2, src_int3);
- dst[i] = lp_build_intrinsic_binary(builder, "llvm.x86.sse2.packuswb.128",
- int16_vec_type, lo, hi);
-#endif
+ lo = lp_build_pack2(builder, int32_type, int16_type, src_int0, src_int1);
+ hi = lp_build_pack2(builder, int32_type, int16_type, src_int2, src_int3);
+ dst[i] = lp_build_pack2(builder, int16_type, dst_type, lo, hi);
}
return;
}
More information about the mesa-commit
mailing list