https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86952
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-23 Ever confirmed|0 |1 --- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> --- Please try retpoline-table branch at https://github.com/hjl-tools/microbenchmark I got [hjl@gnu-cfl-1 microbenchmark]$ make gcc -g -I. -O2 -mindirect-branch=thunk -c -o test.o test.c gcc -g -I. -O2 -mindirect-branch=thunk -fno-jump-tables -c -o switch-no-table.o switch-no-table.c gcc -g -I. -O2 -mindirect-branch=thunk -c -o switch.o switch.c gcc -o test test.o switch-no-table.o switch.o ./test no jump table: 189484 jump table : 333016 [hjl@gnu-cfl-1 microbenchmark]$