mirror of
https://github.com/openharmony/third_party_minimp3.git
synced 2026-07-01 10:05:26 -04:00
suppress spurious -Waggressive-loop-optimizations warning
Workaround for issue #88
This commit is contained in:
@@ -881,12 +881,22 @@ static void L3_midside_stereo(float *left, int n)
|
||||
int i = 0;
|
||||
float *right = left + 576;
|
||||
#if HAVE_SIMD
|
||||
if (have_simd()) for (; i < n - 3; i += 4)
|
||||
if (have_simd())
|
||||
{
|
||||
f4 vl = VLD(left + i);
|
||||
f4 vr = VLD(right + i);
|
||||
VSTORE(left + i, VADD(vl, vr));
|
||||
VSTORE(right + i, VSUB(vl, vr));
|
||||
for (; i < n - 3; i += 4)
|
||||
{
|
||||
f4 vl = VLD(left + i);
|
||||
f4 vr = VLD(right + i);
|
||||
VSTORE(left + i, VADD(vl, vr));
|
||||
VSTORE(right + i, VSUB(vl, vr));
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
/* Workaround for spurious -Waggressive-loop-optimizations warning from gcc.
|
||||
* For more info see: https://github.com/lieff/minimp3/issues/88
|
||||
*/
|
||||
if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0)
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
#endif /* HAVE_SIMD */
|
||||
for (; i < n; i++)
|
||||
|
||||
Reference in New Issue
Block a user