Skip to content

PPC SSE emulation wrappers don't work in C++ mode #49864

Closed
@nemanjai

Description

@nemanjai
Bugzilla Link 50520
Resolution FIXED
Resolved on Jun 08, 2021 15:57
Version unspecified
OS Linux
Blocks #48661
CC @topperc,@ecnelises,@zygoloid,@tstellar
Fixed by commit(s) c0b3071 0826268

Extended Description

To reproduce:
$ cat xmm.cpp
#include <xmmintrin.h>
int test(int a) { return a + 2; }

$ clang++ xmm.cpp -S -DNO_WARN_X86_INTRINSICS -O3
In file included from xmm.cpp:1:
clang/13.0.0/include/ppc_wrappers/xmmintrin.h:978:42: error: controlling expression type '__v4sf' (vector of 4 'float' values) not compatible with any generic association type
result = (__vector unsigned long long) vec_cts (rounded, 0);
^~~~~~~~~~~~~~~~~~~~
clang/13.0.0/include/altivec.h:3248:12: note: expanded from macro 'vec_cts'
_Generic((__a), vector float
^~~~~
In file included from xmm.cpp:1:
clang/13.0.0/include/ppc_wrappers/xmmintrin.h:1035:42: error: controlling expression type '__v4sf' (vector of 4 'float' values) not compatible with any generic association type
result = (__vector unsigned long long) vec_cts (temp, 0);
^~~~~~~~~~~~~~~~~
clang/13.0.0/include/altivec.h:3248:12: note: expanded from macro 'vec_cts'
_Generic((__a), vector float
^~~~~
In file included from xmm.cpp:1:
clang/13.0.0/include/ppc_wrappers/xmmintrin.h:1204:10: error: controlling expression type '__v4sf' (vector of 4 'float' values) not compatible with any generic association type
temp = vec_cts (rounded, 0);
^~~~~~~~~~~~~~~~~~~~
clang/13.0.0/include/altivec.h:3248:12: note: expanded from macro 'vec_cts'
_Generic((__a), vector float
^~~~~
In file included from xmm.cpp:1:
clang/13.0.0/include/ppc_wrappers/xmmintrin.h:1221:11: error: controlling expression type '__v4sf' (vector of 4 'float' values) not compatible with any generic association type
tmp_i = vec_cts (rounded, 0);
^~~~~~~~~~~~~~~~~~~~
clang/13.0.0/include/altivec.h:3248:12: note: expanded from macro 'vec_cts'
_Generic((__a), vector float
^~~~~
4 errors generated.

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillaclang:headersHeaders provided by Clang, e.g. for intrinsics

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions