← Back to index
|
Original Bugzilla link
Bug 19940 – core.simd.{load,store}Unaligned functions do not support 32-byte vectors
Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-05T01:33:50Z
Last change time
2024-12-07T13:39:19Z
Keywords
SIMD
Assigned to
No Owner
Creator
Mike Franklin
Moved to GitHub: dmd#17383 →
Comments
Comment #0
by slavo5150 — 2019-06-05T01:33:50Z
void copy32(T)(T* d, const T* s) { import core.simd; static foreach(i; 0..T.sizeof/32) { // Error: {load,store}Unaligned is not supported for 32-byte vectors storeUnaligned(cast(void32*)(d) + i, loadUnaligned(cast(const void32*)(s) + i)); } } void copy16(T)(T* d, const T* s) { import core.simd; static foreach(i; 0..T.sizeof/16) { // This works fine for 16-byte vectors storeUnaligned(cast(void16*)(d) + i, loadUnaligned(cast(const void16*)(s) + i)); } } struct S(size_t n) { align(32) ubyte[n] x; } void main() { S!64 s1; S!64 s2; copy16(&s2, &s1); copy32(&s2, &s1); } Compile with `dmd -mcpu=avx`. The {load,store}Unaligned calls with 32-byte vector types will fail to compile, but will work fine for 16-byte vector types.
Comment #1
by robert.schadek — 2024-12-07T13:39:19Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/17383
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB