Details
Details
- Reviewers
craig.topper - Commits
- rG615af94dc20c: [RISCV] Lower VECTOR_SHUFFLE to VSLIDEDOWN_VL.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2905 | I think you need to check that Mask[0] is >= 0. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2905 |
I guess more precisely, it would need to be > 0 or it would definitely not be a slidedown. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2901 | I don’t think it’s enough to be contiguous. The first index must be 0. If it’s not you won’t extract the correct subvector at the end. |
Comment Actions
Apply Craig's comments.
- Mask should not starts with -1.
- Index of V1 EXTRACT_SUBVECTOR should be 0.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2907 | Checking Mask[0] < 0 would allow a faster exit for cases that obviously won't match slidedown. |
I don’t think it’s enough to be contiguous. The first index must be 0. If it’s not you won’t extract the correct subvector at the end.