512 bit static array to vector

Bruce Carneal bcarneal at gmail.com
Sun Jun 19 14:13:45 UTC 2022


Here's a comparison between ldc and gdc converting static arrays 
to 512 bit vectors:
https://godbolt.org/z/8jxafh76W

A few observations:
1) LDC requires more instructions at 512 bits. At 256 (x86-64-v3) 
they're the same.
2) LDC emits worse code for the cleaner .array assignment than 
for the union hack.
3) LDC fabricates non-HW __vectors so is(someVector) has 
diminished CT utility.

Is improving LLVM/LDC wrt any of the above relatively simple?



More information about the digitalmars-d-ldc mailing list