[Bug target/78102] [5/6/7 regression] GCC refuses to generate PCMPEQQ instruction for SSE4.1

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 25 07:45:00 GMT 2016


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Target|                            |x86_64-*-*, i?86-*-*
   Target Milestone|---                         |5.5

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
IL before vector lowering:

pcmpeqq (const __m128i x, const __m128i y)
{
  vector(2) long int _4;

  <bb 2>:
  _4 = VEC_COND_EXPR <x_2(D) == y_3(D), { -1, -1 }, { 0, 0 }>;
  return _4;

}

I suppose sse4.1 has only equality compares but not relational ones.  We're
missing an optab for this special case and thus can't expand the above.

This means using GCC vector extensions in the header for the intrinsic was
a bad idea in this particular case.


More information about the Gcc-bugs mailing list