[Bug tree-optimization/78180] Poor optimization of std::array on gcc 4.8/5.4/6.2 as compared to simple raw array

2016-11-03 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180 --- Comment #8 from Barry Revzin --- -D_GLIBCXX_USE_CXX11_ABI=0 doesn't matter. It's just that I'd compiled google benchmark with 4.8, and then wanted to test this behavior with 5.4 and 6.2. It has no impact on the generated assembly as far as I

[Bug tree-optimization/78180] Poor optimization of std::array on gcc 4.8/5.4/6.2 as compared to simple raw array

2016-11-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180 --- Comment #7 from Andrew Pinski --- By moving the array to be end of struct Rolling, GCC does the correct thing and optimizing out the load of idx out of the loop. That is: template class Rolling { uint32_t idx_; const uint32_t size_;

[Bug tree-optimization/78180] Poor optimization of std::array on gcc 4.8/5.4/6.2 as compared to simple raw array

2016-11-02 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180 Andrew Pinski changed: What|Removed |Added Component|middle-end |tree-optimization --- Comment #6 from An