mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Try a clang pragma to avoid overeager auto-vectorization
This commit is contained in:
1 parent
9e60b82c54
commit
3efce3ceca
1 file changed
+11
@@ -41,6 +41,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#define DO_NOT_VECTORIZE_LOOP #pragma clang loop vectorize(disable)
|
||||
#else
|
||||
#define DO_NOT_VECTORIZE_LOOP
|
||||
#endif
|
||||
|
||||
#ifdef _M_SSE
|
||||
|
||||
static u32 QuickTexHashSSE2(const void *checkp, u32 size) {
|
||||
@@ -707,6 +713,7 @@ void CopyAndSumMask16(u16 *dst, const u16 *src, int width, u32 *outMask) {
|
||||
}
|
||||
#endif
|
||||
|
||||
DO_NOT_VECTORIZE_LOOP;
|
||||
for (int i = 0; i < width; i++) {
|
||||
u16 color = src[i];
|
||||
mask &= color;
|
||||
@@ -746,6 +753,7 @@ void CopyAndSumMask32(u32 *dst, const u32 *src, int width, u32 *outMask) {
|
||||
}
|
||||
#endif
|
||||
|
||||
DO_NOT_VECTORIZE_LOOP;
|
||||
for (int i = 0; i < width; i++) {
|
||||
u32 color = src[i];
|
||||
mask &= color;
|
||||
@@ -777,6 +785,8 @@ void CheckMask16(const u16 *src, int width, u32 *outMask) {
|
||||
mask = NEONReduce16And(wideMask);
|
||||
}
|
||||
#endif
|
||||
|
||||
DO_NOT_VECTORIZE_LOOP;
|
||||
for (int i = 0; i < width; i++) {
|
||||
mask &= src[i];
|
||||
}
|
||||
@@ -807,6 +817,7 @@ void CheckMask32(const u32 *src, int width, u32 *outMask) {
|
||||
}
|
||||
#endif
|
||||
|
||||
DO_NOT_VECTORIZE_LOOP;
|
||||
for (int i = 0; i < width; i++) {
|
||||
mask &= src[i];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user