You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the std::intrinsics::unlikely/likely function is used, the codegen doesn't emit llvm.expect annotation in release mode. Curiously enough, in debug mode it does emit it.
Playground link here. In debug mode, LLVM IR contains llvm.expect. In release mode, it doesn't.
This has been previously noted here (maybe it indeed started with LLVM 13?) and more recently here.
I can take a look into this, if you can point me into the right direction. There is a codegen test for likely/unlikely, but it uses -C no-prepopulate-passes, which does not correspond to what release (-O) does.