[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2020-04-13 Thread gcc-bugs at hussar dot me.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #12 from Jason --- This significant change appears to have been resolved in g++ v8.1.0. So now g++ does the same as the massive corpus of computer science and other compilers.

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-24 Thread jvg1981 at aim dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #11 from Joshua Green --- (In reply to Segher Boessenkool from comment #10) > GCC thinks bar2 will be executed more often that bar1; the code > it generates is perfectly fine for that. > > If you think GCC's heuristics for branch

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-23 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #10 from Segher Boessenkool --- GCC thinks bar2 will be executed more often that bar1; the code it generates is perfectly fine for that. If you think GCC's heuristics for branch prediction are no good, could use some improvement,

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-21 Thread jvg1981 at aim dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #7 from Joshua Green --- (In reply to Segher Boessenkool from comment #6) > bb-reorder changes the conditional branch so that the fallthrough path > is the most likely. It now also does this for -O1. This is faster on >

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #8 from Segher Boessenkool --- (In reply to Joshua Green from comment #7) > and I see no reason why expecting the "else" block should a priori be > preferable in either case. GCC does some fairly involved prediction (in predict.c).

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-21 Thread jvg1981 at aim dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 --- Comment #9 from Joshua Green --- (In reply to Segher Boessenkool from comment #8) > GCC does some fairly involved prediction (in predict.c). It isn't > "a priori". > > > (It's also not clear HOW this could be "faster > > on essentially all

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 Segher Boessenkool changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-11-19 Thread jvg1981 at aim dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 jvg1981 at aim dot com changed: What|Removed |Added CC||jvg1981 at aim dot com ---

[Bug tree-optimization/66573] Unexpected change in static, branch-prediction cost from O1 to O2 in if-then-else.

2015-06-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573 Andrew Pinski pinskia at gcc dot gnu.org changed: What|Removed |Added Component|rtl-optimization