diff options
author | José Fonseca <[email protected]> | 2009-08-08 22:57:03 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:26 +0100 |
commit | 145de19548157ad1ba0c314e38a44168e462bb4c (patch) | |
tree | 0b7640b126f8ebe55a4a4771e21e218e591b6b94 /src | |
parent | a9771d2b7580ae1273c4edeb9eebcafab39a72bb (diff) |
llvmpipe: Use full set of sse4 min/max intrinsics.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_arit.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.c b/src/gallium/drivers/llvmpipe/lp_bld_arit.c index 461c01310ca..8e9049601a9 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.c @@ -65,16 +65,25 @@ lp_build_min_simple(struct lp_build_context *bld, #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) if(type.width * type.length == 128) { - if(type.floating) + if(type.floating) { if(type.width == 32) intrinsic = "llvm.x86.sse.min.ps"; if(type.width == 64) intrinsic = "llvm.x86.sse2.min.pd"; + } else { if(type.width == 8 && !type.sign) intrinsic = "llvm.x86.sse2.pminu.b"; + if(type.width == 8 && type.sign) + intrinsic = "llvm.x86.sse41.pminsb"; + if(type.width == 16 && !type.sign) + intrinsic = "llvm.x86.sse41.pminuw"; if(type.width == 16 && type.sign) intrinsic = "llvm.x86.sse2.pmins.w"; + if(type.width == 32 && !type.sign) + intrinsic = "llvm.x86.sse41.pminud"; + if(type.width == 32 && type.sign) + intrinsic = "llvm.x86.sse41.pminsd"; } } #endif @@ -103,16 +112,25 @@ lp_build_max_simple(struct lp_build_context *bld, #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) if(type.width * type.length == 128) { - if(type.floating) + if(type.floating) { if(type.width == 32) intrinsic = "llvm.x86.sse.max.ps"; if(type.width == 64) intrinsic = "llvm.x86.sse2.max.pd"; + } else { if(type.width == 8 && !type.sign) intrinsic = "llvm.x86.sse2.pmaxu.b"; + if(type.width == 8 && type.sign) + intrinsic = "llvm.x86.sse41.pmaxsb"; + if(type.width == 16 && !type.sign) + intrinsic = "llvm.x86.sse41.pmaxuw"; if(type.width == 16 && type.sign) intrinsic = "llvm.x86.sse2.pmaxs.w"; + if(type.width == 32 && !type.sign) + intrinsic = "llvm.x86.sse41.pmaxud"; + if(type.width == 32 && type.sign) + intrinsic = "llvm.x86.sse41.pmaxsd"; } } #endif |