[Bug c/26366] __builtin_expect needs better documentation

2018-11-11 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26366 sandra at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Bug c/26366] __builtin_expect needs better documentation

2018-11-11 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26366 --- Comment #6 from sandra at gcc dot gnu.org --- Author: sandra Date: Sun Nov 11 18:39:10 2018 New Revision: 266017 URL: https://gcc.gnu.org/viewcvs?rev=266017&root=gcc&view=rev Log: 2018-11-11 Sandra Loosemore PR c/26366 gc

[Bug c/26366] __builtin_expect needs better documentation

2006-02-21 Thread acahalan at gmail dot com
--- Comment #5 from acahalan at gmail dot com 2006-02-22 03:14 --- The code in comment #4 really isn't the same as the original. The original is a decorated version of this: if(x && y) It is meant to express that: x is likely y is likely x&&y is unlikely Here, the probability of x ti

[Bug c/26366] __builtin_expect needs better documentation

2006-02-21 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2006-02-21 09:57 --- Another way instead of if(__builtin_expect((__builtin_expect(x,1) && __builtin_expect(y,1)), 0)) would be if(__builtin_expect(!(x && y), 1)) I'm sure this does _not_ result in same behavior as __builtin_expect is

[Bug c/26366] __builtin_expect needs better documentation

2006-02-19 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-20 02:06 --- x86 is forgiving because there is no such bit that is used (well except for the prescott and GCC disables it because it was a wash and used up space). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26366

[Bug c/26366] __builtin_expect needs better documentation

2006-02-19 Thread acahalan at gmail dot com
--- Comment #2 from acahalan at gmail dot com 2006-02-19 21:48 --- Nope, at least if the documentation at http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html is what you refer to. It would be good to document how strong the expectation is for each architecture. Apparently the differe

[Bug c/26366] __builtin_expect needs better documentation

2006-02-19 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-19 20:25 --- I thought the documention said only to use __builtin_expect when you know that in almost 100% of the time it is going to be true (or false). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26366