From 823bb1a9430bc0c4735ffefbbe19efe45887e32c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 13 Sep 2009 15:04:54 +0100 Subject: [PATCH] [sse2] Don't emit prefetch 0 for an absent mask --- pixman/pixman-sse2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c index 9104e8d..fc78765 100644 --- a/pixman/pixman-sse2.c +++ b/pixman/pixman-sse2.c @@ -629,7 +629,8 @@ core_combine_over_u_sse2 (uint32_t* pd, /* call prefetch hint to optimize cache load*/ cache_prefetch ((__m128i*)ps); cache_prefetch ((__m128i*)pd); - cache_prefetch ((__m128i*)pm); + if (pm) + cache_prefetch ((__m128i*)pm); /* Align dst on a 16-byte boundary */ while (w && ((unsigned long)pd & 15)) @@ -647,14 +648,16 @@ core_combine_over_u_sse2 (uint32_t* pd, /* call prefetch hint to optimize cache load*/ cache_prefetch ((__m128i*)ps); cache_prefetch ((__m128i*)pd); - cache_prefetch ((__m128i*)pm); + if (pm) + cache_prefetch ((__m128i*)pm); while (w >= 4) { /* fill cache line with next memory */ cache_prefetch_next ((__m128i*)ps); cache_prefetch_next ((__m128i*)pd); - cache_prefetch_next ((__m128i*)pm); + if (pm) + cache_prefetch_next ((__m128i*)pm); /* I'm loading unaligned because I'm not sure about * the address alignment. -- 2.7.4