Bug 200671
Summary: | Linux kernel build fails with gcc trunk | ||
---|---|---|---|
Product: | Other | Reporter: | Kugan (kuganv) |
Component: | Other | Assignee: | other_other |
Status: | NEW --- | ||
Severity: | normal | CC: | aspriel, kuganv, mliska, will.deacon |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.10.3 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Kugan
2018-07-27 23:34:07 UTC
Whilst providing an implementation of __popcountsi2 will fix the build, won't this end up with worse code generation compared to a compiler which doesn't do this idiom recognition? If I understand this correctly, an in-line integer popcount implementation in the code can be spotted by the compiler and replaced by a branch to an out-of-line integer popcount implementation. Please can we have an option to disable this idiom recognition? It really doesn't seem to make sense in an environment where the SIMD registers aren't readily accessible. GCC trunk, as of now, do not detect popcount buitins if the back end does not defines popcount. I have committed the changes to GCC so that Linux kernel builds fine. This primarily done because there isn't much (or no) benefit in-terms of performance in those cases. However, gcc plans to enable this when optimizing for size (there is still code size benefit) in the next GCC development cycle. |