[all-commits] [llvm/llvm-project] d23de1: [RISCV] Add tests for concats of vectors that coul...
Luke Lau via All-commits
all-commits at lists.llvm.org
Wed Apr 19 01:37:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d23de1bd155bc9ab972dd19ed8c5a27b42bac5da
https://github.com/llvm/llvm-project/commit/d23de1bd155bc9ab972dd19ed8c5a27b42bac5da
Author: Luke Lau <luke at igalia.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-combine.ll
Log Message:
-----------
[RISCV] Add tests for concats of vectors that could become strided loads
These patterns of concat_vector nodes of loads can be combined into
widened vector loads or a strided vector loads.
Co-authored-by: Philip Reames <preames at rivosinc.com>
Differential Revision: https://reviews.llvm.org/D147712
Commit: 18dc205112dfc411546272e3eb378088944620eb
https://github.com/llvm/llvm-project/commit/18dc205112dfc411546272e3eb378088944620eb
Author: Luke Lau <luke at igalia.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-strided-load-combine.ll
Log Message:
-----------
[RISCV] Combine concat_vectors of loads into strided loads
If we're concatenating several smaller loads separated by a stride, we
can try and increase the element size and perform a strided load.
For example:
```
concat_vectors (load v4i8, p+0), (load v4i8, p+n), (load v4i8, p+n*2), (load v4i8, p+n*3)
=>
vlse32 p, stride=n, VL=4
```
This pattern can be produced by the SLP vectorizer.
A special case is when the stride is exactly equal to the width of the
vector, in which case it can be converted into a single consecutive
vector load. For example:
```
concat_vectors (load v4i8, p), (load v4i8, p+4), (load v4i8, p+8), (load v4i8, p+12)
=>
vle8 p, VL=16
```
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D147713
Compare: https://github.com/llvm/llvm-project/compare/107b307bd61e...18dc205112df
More information about the All-commits
mailing list