| Message ID | 20260114173918.1744023-17-kieran.bingham@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/ipa/libipa/fixedpoint.h b/src/ipa/libipa/fixedpoint.h index 1d53b0b9fdde..b4190988f1ee 100644 --- a/src/ipa/libipa/fixedpoint.h +++ b/src/ipa/libipa/fixedpoint.h @@ -69,12 +69,7 @@ public: { v = std::clamp(v, min, max); - /* - * The intermediate cast to int is needed on arm platforms to - * properly cast negative values. See - * https://embeddeduse.com/2013/08/25/casting-a-negative-float-to-an-unsigned-int/ - */ - return static_cast<T>(static_cast<int>(std::round(v * (1 << F)))) & bitMask; + return static_cast<T>(std::round(v * (1 << F))) & bitMask; } };