-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsics
Description
| Bugzilla Link | 44589 |
| Resolution | FIXED |
| Resolved on | Feb 12, 2020 05:53 |
| Version | 10.0 |
| OS | All |
| Blocks | #43900 |
| Attachments | Patch to cast the vectors to __v4hi |
| Reporter | LLVM Bugzilla Contributor |
| CC | @topperc,@zmodem,@RKSimon,@zygoloid |
| Fixed by commit(s) | 16b9410 |
Extended Description
When using either _mm_extract_pi16 or _mm_insert_pi16 with the -Wvector-conversion warning enabled, clang will emit a diagnostic since the builtins used by both functions expect a vector of 4 shorts, but __m64 is a vector of 1 long long.
Here is a trivial test case:
#include <xmmintrin.h>
int16_t extract(__m64 a) {
return _mm_extract_pi16(a, 0);
}
__m64 insert(__m64 a, int d) {
return _mm_insert_pi16(a, d, 0);
}
A patch to simply cast the vectors to __v4hi instead of __m64 (which works for me) is attached.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsics