File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1064,12 +1064,22 @@ static void drmp3_L3_midside_stereo(float *left, int n)
10641064 int i = 0 ;
10651065 float * right = left + 576 ;
10661066#if DRMP3_HAVE_SIMD
1067- if (drmp3_have_simd ()) for (; i < n - 3 ; i += 4 )
1067+ if (drmp3_have_simd ())
10681068 {
1069- drmp3_f4 vl = DRMP3_VLD (left + i );
1070- drmp3_f4 vr = DRMP3_VLD (right + i );
1071- DRMP3_VSTORE (left + i , DRMP3_VADD (vl , vr ));
1072- DRMP3_VSTORE (right + i , DRMP3_VSUB (vl , vr ));
1069+ for (; i < n - 3 ; i += 4 )
1070+ {
1071+ drmp3_f4 vl = DRMP3_VLD (left + i );
1072+ drmp3_f4 vr = DRMP3_VLD (right + i );
1073+ DRMP3_VSTORE (left + i , DRMP3_VADD (vl , vr ));
1074+ DRMP3_VSTORE (right + i , DRMP3_VSUB (vl , vr ));
1075+ }
1076+ #ifdef __GNUC__
1077+ /* Workaround for spurious -Waggressive-loop-optimizations warning from gcc.
1078+ * For more info see: https://github.com/lieff/minimp3/issues/88
1079+ */
1080+ if (__builtin_constant_p (n % 4 == 0 ) && n % 4 == 0 )
1081+ return ;
1082+ #endif
10731083 }
10741084#endif
10751085 for (; i < n ; i ++ )
You can’t perform that action at this time.
0 commit comments