[llvm-bugs] [Bug 27594] New: AVX _mm256_extract_epi8 broken
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 1 14:01:27 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27594
Bug ID: 27594
Summary: AVX _mm256_extract_epi8 broken
Product: clang
Version: 3.7
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: rozhuk.im at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
I try port some SSE code to AVX and found that clang instricts
_mm256_extract_epi8 broken:
_mm256_extract_epi8(__aymm0, 0) - BAD result
_mm256_extract_epi8(__aymm0, 0) & 0xff - OK
_mm_extract_epi8(_mm256_extractf128_si256(__aymm0, 0), 0) - OK
Same time: _mm256_extract_epi8(__aymm0, 0) build with GCC - OK.
CLANG:
static __inline int __attribute__((__always_inline__, __nodebug__))
_mm256_extract_epi8(__m256i __a, int const __imm)
{
__v32qi __b = (__v32qi)__a;
return __b[__imm & 31];
}
GCC:
extern __inline int __attribute__((__gnu_inline__, __always_inline__,
__artificial__))
_mm256_extract_epi8 (__m256i const __X, int const __N)
{
__m128i __Y = _mm256_extractf128_si256 (__X, __N >> 4);
return _mm_extract_epi8 (__Y, __N % 16);
}
_mm256_extract_epi16, _mm256_extract_epi32 may be affected too.
Tested with: Clang 3.4.1, 3.6, 3.7 and GCC 4.8.5
--
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/20160501/ba391d96/attachment.html>
More information about the llvm-bugs
mailing list