diff --git a/polar_helper.hh b/polar_helper.hh index 060eea2..e05c599 100644 --- a/polar_helper.hh +++ b/polar_helper.hh @@ -146,9 +146,9 @@ struct PolarHelper> static TYPE madd(TYPE a, TYPE b, TYPE c) { #ifdef __ARM_NEON - return vqadd(vmul(a, vmax(b, vdup(-127))), c); + return vmax(vqadd(vmul(a, vmax(b, vdup(-127))), c), vdup(-127)); #else - return vqadd(vsign(vmax(b, vdup(-127)), a), c); + return vmax(vqadd(vsign(vmax(b, vdup(-127)), a), c), vdup(-127)); #endif } };