https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105973
--- Comment #4 from hubicka at kam dot mff.cuni.cz --- > possibly the noreturn predictor doesn't trigger here The problem here is that we handle throw1 and throw2 as two independent reason for code path to be unlikely. This makes us to look for conditional controling the code path and we predict the inner if both ways as unlikely so they cancel out. I suppose we could be smarter here and teach path predictor to check for this situation and if both directions of a branch are considered bad for same reason continue propagating up. This shoudl not be hard to implement.