diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-02-10 09:29:39 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-02-10 09:39:35 -0800 |
commit | b0e77d5e489a91f39724e3e3bca48624de2fbaa2 (patch) | |
tree | 7cdd9e5b1202914a4da4b2337009732f646bbda5 /llvm/lib/Object/WasmObjectFile.cpp | |
parent | 85b89ed213c41a8d7dafff957c8d20a247e6d9df (diff) | |
download | llvm-b0e77d5e489a91f39724e3e3bca48624de2fbaa2.zip llvm-b0e77d5e489a91f39724e3e3bca48624de2fbaa2.tar.gz llvm-b0e77d5e489a91f39724e3e3bca48624de2fbaa2.tar.bz2 |
[RISCV] Lower the shufflevector equivalent of vector.splice
We can lower a vector splice to a vslidedown and a vslideup.
The majority of the matching code here came from X86's code for matching
PALIGNR and VPALIGND/Q.
The slidedown and slideup lowering don't really require it to be concatenation,
but it happened to be an interesting pattern with existing analysis code I
could use.
This helps with cases where the scalar loop optimizer forwarded a load
result from a previous loop iteration. For example, this happens if the
loop uses x[i] and x[i+1] on the same iteration. The scalar optimizer
will forward x[i+1] load from the previous loop to satisfy x[i] on this
loop. When this get vectorized it results in one element of a vector
being forwarded from the previous loop to be concatenated with elements
loaded on this iteration.
Whether that's more efficient than doing a shifted loaded or reloading
the single scalar and using vslide1up is an interesting question.
But that's not something the backend can help with.
Reviewed By: khchen
Differential Revision: https://reviews.llvm.org/D119039
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions