Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upConsider compiling SIMD-from-SIMD initialisation directly to a shuffle #18148
Comments
This comment has been minimized.
This comment has been minimized.
|
If we would stop using |
huonw
referenced this issue
Nov 4, 2014
Merged
Translate SIMD construction as `insertelement`s and a single store. #18615
steveklabnik
added
the
A-codegen
label
Jan 27, 2015
This comment has been minimized.
This comment has been minimized.
|
Two things:
updated code:
|
This comment has been minimized.
This comment has been minimized.
This is a code-generation thing, so external SIMD would still benefit.
There's still 4 that could theoretically be removed. (Thanks for prompting for updates!) |
brson
added
I-wishlist
T-compiler
labels
Mar 23, 2017
This comment has been minimized.
This comment has been minimized.
|
Closing wishlist. |
huonw commentedOct 19, 2014
becomes, with no optimisations:
with optimisations it becomes
We could detect when a SIMD vector is being created directly from elements of another (pair of*) SIMD vector(s) and convert it directly into the appropriate shuffle instruction. This will save allocas and LLVM doing work, and probably guarantees it more than LLVM currently does. This should even work for vectors of different lengths, as long as the elements are the same.
(This is just a bug since it's an implementation detail.)
*
shufflevectoractually takes two operands, sof32x2(x.0, y.0, x.1, y.1)can also directly become a shuffle.