[llvm-bugs] [Bug 24532] New: Wrong mask generated for _mm_blendv_epi8
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 21 07:01:26 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24532
Bug ID: 24532
Summary: Wrong mask generated for _mm_blendv_epi8
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: aivchenk at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 14754
--> https://llvm.org/bugs/attachment.cgi?id=14754&action=edit
Reprocuder
Following code works with gcc and clang -O0, but fails on clang -O1:
_mm_blendv_epi8 produces wrong result in that case.
>gcc ../blend.cpp -msse4.2 -O2 -o gcc.exe ; ./gcc.exe
finish blend testing
>clang++ ../blend.cpp -msse4.2 -O0; ./a.out
finish blend testing
>clang++ ../blend.cpp -msse4.2 -O1; ./a.out
Aborted (core dumped)
I tested trunk so far only, but I suspect the issue affects 3.6 as well.
The problem is with wrong mask generated for pblendvb:
movdqa (%rsi), %xmm1
movaps .LCPI0_0(%rip), %xmm0 # xmm0 =
[0,0,0,255,0,0,0,255,255,255,255,255,255,255,255,255]
pblendvb (%rdx), %xmm1
movdqa %xmm1, (%rdi)
While the actual mask for the intrinsic was 0xff00000000000000ff000000ff000000
--
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/20150821/fcccffcc/attachment.html>
More information about the llvm-bugs
mailing list