diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-10-12 14:15:59 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-10-12 14:17:21 +0100 |
commit | e3ec0fdd546259005c9ed2bf7b05cead2ab95b43 (patch) | |
tree | 10a4a4025f7b2682684042544ed5a5ddd7247564 /src | |
parent | b6b7ce84e517cfb7d1c02ef2f389c8f2e5fea04c (diff) |
llmvpipe: improve mm_mullo_epi32
Apply Jose's suggestions for a small but measurable improvement in
isosurf.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast_tri.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c index 19b0bd686a8..c3eefb724cf 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c @@ -321,8 +321,8 @@ transpose4_epi32(const __m128i * restrict a, */ static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b) { - __m128i a4 = _mm_srli_si128(a, 4); /* shift by one dword */ - __m128i b4 = _mm_srli_si128(b, 4); /* shift by one dword */ + __m128i a4 = _mm_srli_epi64(a, 32); /* shift by one dword */ + __m128i b4 = _mm_srli_epi64(b, 32); /* shift by one dword */ __m128i ba = _mm_mul_epu32(b, a); /* multply dwords 0, 2 */ __m128i b4a4 = _mm_mul_epu32(b4, a4); /* multiply dwords 1, 3 */ @@ -336,8 +336,7 @@ static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b) #else __m128i mask = _mm_setr_epi32(~0,0,~0,0); __m128i ba_mask = _mm_and_si128(ba, mask); - __m128i b4a4_mask = _mm_and_si128(b4a4, mask); - __m128i b4a4_mask_shift = _mm_slli_si128(b4a4_mask, 4); + __m128i b4a4_mask_shift = _mm_slli_epi64(b4a4, 32); __m128i result = _mm_or_si128(ba_mask, b4a4_mask_shift); #endif |