[LLVMbugs] [Bug 7145] New: Error with handling casting operator to SSE2 SIMD types
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 14 17:29:44 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7145
Summary: Error with handling casting operator to SSE2 SIMD
types
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: joel.falcou at lri.fr
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Here is a sample file that compiles correctly on g++ and MSVC:
#include <cstdio>
#include <xmmintrin.h>
template <class V >
struct foo
{
V m;
operator V() const { return m; }
};
int main()
{
foo <__m128> x = {{1, 2, 3, 4}};
__m128 y = _mm_shuffle_ps(x, x, 0);
}
Latets clang (fresh from the SVN) on Linux x86 give the following error:
src/pipo.cpp:16:14: error: first two arguments to
__builtin_shufflevector must be vectors
__m128 y = _mm_shuffle_ps(x, x, 0);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from src/pipo.cpp:2:
/usr/local/lib/clang/2.0/include/xmmintrin.h:726:10: note: instantiated
from:
(__builtin_shufflevector(a, b, (mask) & 0x3, ((mask) & 0xc) >> 2, \
^
1 error generated.
This error doesn't appear if we use _mm_add_ps or other intrinsics. Same
behavior for __m128i and __m128d
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list