Fix LegalizeVectorOps to not try shuffle or unrolling expansions for
scalable vectors.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
It's not very clear to me why we have different ways of expanding bswap. Why doesn't VectorLegalizer::ExpandBSWAP always call TLI.expandBSWAP, for instance?
Comment Actions
ExpandBSWAP is using the shift+and+or expansion. VectorLegalizer::ExpandBSWAP tries to use a shuffle+bitcast which would only be legal for a vector. I suppose we could sink that into expandBSWAP with a .isFixedVector() check if that's what you're asking?
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | ||
---|---|---|
1099 | I've made a bold assumption here that SHL/SRL/AND/OR are all LegalOrCustom for a scalable vector. Otherwise the unroll fallback would crash. |
I've made a bold assumption here that SHL/SRL/AND/OR are all LegalOrCustom for a scalable vector. Otherwise the unroll fallback would crash.