[Bug target/115749] Non optimal assembly for integer modulo by a constant on x86-64 CPUs

2024-07-03 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749 --- Comment #9 from kim.walisch at gmail dot com --- Here I am providing some benchmark results to back up my claim that switching to the integer modulo by a constant algorithm with 2 multiplication instructions (which is the default in both Clan

[Bug target/115749] Non optimal assembly for integer modulo by a constant on x86-64 CPUs

2024-07-02 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749 --- Comment #4 from kim.walisch at gmail dot com --- One possible explanation for why GCC's current integer division by a constant assembly sequence was chosen back in the day (I guess one or two decades ago) is that GCC's current assembly sequen

[Bug target/115749] Non optimal assembly for integer modulo by a constant on x86-64 CPUs

2024-07-02 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749 --- Comment #3 from kim.walisch at gmail dot com --- (In reply to Andrew Pinski from comment #2) > This seems like a tuning issue. In that gcc thinks the shifts and stuff is > faster than mulx. > > What happens if you do -march=native? > > Does

[Bug c++/115749] Missed BMI2 optimization on x86-64

2024-07-02 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749 --- Comment #1 from kim.walisch at gmail dot com --- I played a bit more with my C/C++ code snippet and managed to further simplify it. The GCC performance issue seems to be mostly caused by GCC producing worse assembly than Clang for the integer

[Bug c++/115749] New: Missed BMI2 optimization on x86-64

2024-07-02 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115749 Bug ID: 115749 Summary: Missed BMI2 optimization on x86-64 Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/107452] New: Failed to catch C++ exception thrown from multiarch-function (x64 CPUs)

2022-10-28 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107452 Bug ID: 107452 Summary: Failed to catch C++ exception thrown from multiarch-function (x64 CPUs) Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: norm

[Bug c++/107287] New: -Wuninitialized false positive (in all GCC versions)

2022-10-17 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107287 Bug ID: 107287 Summary: -Wuninitialized false positive (in all GCC versions) Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Comp

[Bug tree-optimization/101831] Spurious maybe-uninitialized warning on std::array::size

2022-01-21 Thread kim.walisch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101831 kim.walisch at gmail dot com changed: What|Removed |Added CC||kim.walisch at gmail dot c