[llvm-bugs] [Bug 25531] New: AVX2: wrong code generated by combining cross-lane permute with in-lane shuffle

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 14 11:36:39 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25531

            Bug ID: 25531
           Summary: AVX2: wrong code generated by combining cross-lane
                    permute with in-lane shuffle
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: tilkax at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

#include <x86intrin.h>

__m256i foo(__m256i v)
{
  v = _mm256_permute4x64_epi64(v, _MM_SHUFFLE(0, 1, 0, 0));
  v = _mm256_shuffle_epi8(v, _mm256_setzero_si256());
  return v;
}

This code is being lowered into a single vpshufb, which doesn't work because
vpshufb can't index across 128-bit lanes.

Could be fixed by partially reverting r230753 or by adding proper 256-bit
support to shuffle chain combining.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151114/21671d31/attachment.html>


More information about the llvm-bugs mailing list