https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86952
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Martin Liška from comment #4) > (In reply to H.J. Lu from comment #3) > > (In reply to Martin Liška from comment #2) > > > H.J. I can write a patch for it. Do you expect more expensive costs when > > > retpolines are enabled? > > > > retpoline is more expensive than 4 branches. > > Can you please make a microbenchmark that will expose how exactly is that > expensive? Based on that I can tune current costs. Is there a testcase where GCC generates a jump table for a five-entry switch statement?