The crucial point, and this doesn't seem to be getting through to you, is that branch prediction doesn't fail anyway. Division by zero is something that's never supposed to happen, and branches where the same path is always taken are essentially free on modern CPUs.

Even for cold code where the predictor has no data yet, you can use [[unlikely]] to make it predict that the divisor is nonzero on the first try.

Therefore, these claims about checking for zero are nothing more than conjecture, and they are almost certainly wrong. Even if they weren't wrong, the compiler could transform if (divisor == 0) into something better, at least in theory.