[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 Richard Biener changed: What|Removed |Added Version|unknown |14.0 Severity|normal

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-28 Thread richard.yao at alumni dot stonybrook.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #8 from Richard Yao --- (In reply to Alexander Monakov from comment #6) > Are you sure the branch is unpredictable in your micro-benchmark? If you > have repeated runs you'll train the predictors. (In reply to Jan Hubicka from comme

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-28 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment #7

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Com

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread richard.yao at alumni dot stonybrook.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #5 from Richard Yao --- (In reply to Andrew Pinski from comment #4) > (In reply to Richard Yao from comment #3) > > (In reply to Andrew Pinski from comment #2) > > > (In reply to Richard Yao from comment #0) > > > > Having the abilit

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #4 from Andrew Pinski --- (In reply to Richard Yao from comment #3) > (In reply to Andrew Pinski from comment #2) > > (In reply to Richard Yao from comment #0) > > > Having the ability to specify __builtin_unpredictable() as a hint t

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread richard.yao at alumni dot stonybrook.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #3 from Richard Yao --- (In reply to Andrew Pinski from comment #2) > (In reply to Richard Yao from comment #0) > > Having the ability to specify __builtin_unpredictable() as a hint to > > encourage the compiler to use cmov would be

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #2 from Andrew Pinski --- (In reply to Richard Yao from comment #0) > Having the ability to specify __builtin_unpredictable() as a hint to > encourage the compiler to use cmov would be useful for implementing > algorithms like binary

[Bug c/110007] Implement support for Clang’s __builtin_unpredictable()

2023-05-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110007 --- Comment #1 from Andrew Pinski --- Note x86 backend still will reject if there are two cmovs close to another because of some cores are much worse with 2 close to another another.