[PATCH] D102063: [LegalizeVectorOps][RISCV] Add scalable-vector SELECT expansion
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 7 04:26:08 PDT 2021
frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, rogfer01, HsiangKai, evandro, RKSimon.
Herald added subscribers: vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
This patch extends VectorLegalizer::ExpandSELECT to permit expansion
also for scalable vector types. The only real change is conditionally
checking for BUILD_VECTOR or SPLAT_VECTOR legality depending on the
vector type.
We can use this to fix "cannot select" errors for scalable vector
selects on the RISCV target. Note that in future patches RISCV will
possibly custom-lower vector SELECTs to VSELECTs for branchless codegen.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102063
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-fp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll
llvm/test/CodeGen/RISCV/rvv/select-fp.ll
llvm/test/CodeGen/RISCV/rvv/select-int.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102063.343642.patch
Type: text/x-patch
Size: 245365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210507/2b9603b3/attachment-0001.bin>
More information about the llvm-commits
mailing list