I've included tests that require type legalization to split the
vector. The i64 version of these scalarizes on RV32 due to type
legalization visiting the result before the vector type. So we
have to abort our custom expansion to avoid creating target
specific nodes with an illegal type. Then type legalization ends
up scalarizing. We might be able to fix this by doing custom
splitting for large vectors in our handler to get down to a legal
type.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Wow yeah that's some heavy scalarization. I think I came across some situations where custom vector legalization may be required, as you say. It just felt odd, though. Do any other targets have to do this, other than simple hi/lo splitting?
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2447 | This (and further down) can now be simplified to = getContainerForFixedLengthVector(VecVT); (after rebasing) |
Only 3 targets use the VECREDUCE nodes today, AArch64, ARM, and RISCV. X86 does not use them yet. AArch64 doesn't have this problem because their largest integer type is their largest vector element type. ARM doesn't appear to support i64 reductions.
Ah right okay, thanks. Anyway, the changes LGTM. I don't know if the size of the test files is a problem. It's not unprecedented but it still makes me uncomfortable.
clang-format not found in user's PATH; not linting file.