[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 --- Comment #7 from Marc Glisse --- PR94589 then.

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 --- Comment #6 from Jonathan Wakely --- So it's just bad codegen for <=> comparisons. Thanks, Barry. The library part is a red herring, the operator> synthesized from <=> is fine to use, it just produces bad code (with GCC, but not Clang).

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 --- Comment #5 from Barry Revzin --- Sorry meant to actually copy the reduction: #include bool compare_count(int a, int b) { return a > b; } bool compare(int a, int b) { return (a <=> b) > 0; } which generates: compare_count(int,

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 Barry Revzin changed: What|Removed |Added CC||barry.revzin at gmail dot com ---

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 --- Comment #3 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > If you write it like this you get good codegen: I think I messed up my testing, and it doesn't help. GCC always chooses the synthesized operator> instead

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/100322] Switching from std=c++17 to std=c++20 causes performance regression in relationals

2021-04-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322 --- Comment #1 from Jonathan Wakely --- Maybe related to either PR 94006 or PR 94566