[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-02 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 Richard Biener changed: What|Removed |Added Keywords||missed-optimization --- Comment #7

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #6 from Andrew Pinski --- I think there is another bug report about: if (_1 > _2) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: _3 = _1 + 1; *a_7(D) = _3; goto ; [100.00%] [local count:

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #5 from Andrew Pinski --- Reference case: [local count: 1073741824]: _1 = *a_7(D); _2 = *b_8(D); if (_1 > _2) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: _3 = _1 + 1; *a_7(D) = _3;

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #4 from Andrew Pinski --- (In reply to anthony.mikh from comment #3) > (In reply to Andrew Pinski from comment #2) > > Clang use of cmov also might produce worse code > > That's exactly why I wrote "seemingly worse". However, the

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread anthony.mikh at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #3 from anthony.mikh at yandex dot ru --- (In reply to Andrew Pinski from comment #2) > Clang use of cmov also might produce worse code That's exactly why I wrote "seemingly worse". However, the approach used by clang uses less

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #2 from Andrew Pinski --- Clang use of cmov also might produce worse code

[Bug middle-end/106804] Poor codegen for selecting and incrementing value behind a reference

2022-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106804 --- Comment #1 from Andrew Pinski --- Note this code gen is a microbenchmarking and might not make a real difference if the function is inlined or even part of some bigger code.