https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78611

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
I can confirm the slowdown with -mavx on ivybridge-E:

-msse4

real    0m0.278s
user    0m0.276s
sys     0m0.002s

-mavx

real    0m0.699s
user    0m0.696s
sys     0m0.003s


in -msse4 case, perf report annotates mtz_ with:

  1.33 │     → callq  logf@plt
       │       addss  0x7acb(%rip),%xmm0        # 40b0cc
<options.236.5085+0x4c>
  6.87 │       mulss  0x7ac7(%rip),%xmm0        # 40b0d0
<options.236.5085+0x50>
  9.53 │       addss  0x7aa7(%rip),%xmm0        # 40b0b8
<options.236.5085+0x38>
  7.54 │       cvttss %xmm0,%eax
  7.76 │       cmp    %r12d,%eax

and in -mavx case:

  0.09 │     → callq  logf@plt
       │       vaddss 0x7a85(%rip),%xmm0,%xmm0        # 40b16c
<options.236.5085+0x4c>
 59.65 │       vmulss 0x7a81(%rip),%xmm0,%xmm0        # 40b170
<options.236.5085+0x50>
  2.92 │       vaddss 0x7a61(%rip),%xmm0,%xmm0        # 40b158
<options.236.5085+0x38>
  2.04 │       vcvtts %xmm0,%eax
  2.65 │       cmp    %r12d,%eax

Something happens with vmulss, but I doubt it is the compiler fault.

Reply via email to