Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nemanjai opened this issue May 28, 2021 · 5 comments
Closed

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

nemanjai opened this issue May 28, 2021 · 5 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang:headers Headers provided by Clang, e.g. for intrinsics

Comments

@nemanjai
Copy link
Member

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.

@nemanjai
Copy link
Member Author

assigned to @ecnelises

@nemanjai
Copy link
Member Author

nemanjai commented Jun 4, 2021

Qiu, you fixed this PR. Since we're trying to get it back-ported to 12.0.1, it is very important to list the commit hash that fixed it.

@nemanjai
Copy link
Member Author

nemanjai commented Jun 4, 2021

Fixed in c0b3071

@ecnelises
Copy link
Member

Thanks, Nemanja! I was not available last week and I saw failure report in comments following that revision (https://reviews.llvm.org/D103386) so I didn't fill the commit hash. Now the failure looks more like a libcxx issue, not a blocker of this.

@tstellar
Copy link
Collaborator

tstellar commented Jun 8, 2021

Merged: 0826268

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:headers Headers provided by Clang, e.g. for intrinsics
Projects
None yet
Development

No branches or pull requests

3 participants