I'm not sure if you mean to imply so, but the __builtin_expect() hint is not embedded in the instruction stream in any way. It mostly affects basic block layout (and not always in a good way).
Newer Intel CPUs (Raptor Lake?) are "adding back" the "branch hint" prefixes. On the Pentium P4, the segment prefixes were repurposed on conditional branches to be branch hints, but then ditched because branch prediction got good. I guess as cores have gotten deeper and deeper it makes sense to bring them back?
- Do not use them in hot code
- Use them only if you have PGO (which ignores static hints like __builtin_expect)
- Use them only if you cannot do it by basic block layout
So it seems very narrow. On top of that, it's only for the P-cores, whose design seems to be on their way out. But thanks, it's good to know nevertheless :-)