https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127420
--- Comment #10 from Haochen Jiang <haochen.jiang at intel dot com> ---
(In reply to H.J. Lu from comment #8)
> (In reply to Haochen Jiang from comment #7)
> > > What are typical cases? Are they C++ programs?
> >
> > All SPEC2026 cases are CXX + C or CXX. For SPEC2017, 511 is CXX + C, the
> > remaining for mentioned is C only.
> >
> > For 735, the case is a 20-case switch in a loop:
> >
> > c3c090: inc %rdx
> > c3c093: mov %ecx,(%rax)
> > c3c095: movq $0x0,0x8(%rax)
> > c3c09d: cmp %rsi,%rdx
> > c3c0a0: jae c3c118
> > c3c0a2: cmp $0x13,%edx
> > c3c0a5: ja c3c2ff
> > c3c0ab: mov %edx,%ecx
> > c3c0ad: jmp *0x1021900(,%rcx,8) # 20-entry tablejump <- 7
> > bytes
> > c3c0b4: nopl 0x0(%rax)
> > c3c0b8: xor %ecx,%ecx # <-- 932,626 hits land here
> > c3c0ba: add $0x10,%rax
> > c3c0be: jmp c3c090
> >
> > The 84% c3c0ad indirect jmp FALLTHRU to c3c0b8, leading to total 26.7% for
> > 735.
>
> My patch only applies to sibcall, not table jump:
>
After excluding the table jmps, there are nearly no occurence:
samples hits rate
jump tables 109,380,239 6,941,545 6.346 %
everything else 26,946,316 50,767 0.188 %
all compiler-generated 136,326,555 6,992,312 5.129 %
I suppose we will see no impact on SPEC