Page MenuHomePhabricator

[LegalizeVectorOps][RISCV] Add scalable-vector SELECT expansion

Authored by frasercrmck on May 7 2021, 4:26 AM.



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.

Diff Detail

Event Timeline

frasercrmck created this revision.May 7 2021, 4:26 AM
frasercrmck requested review of this revision.May 7 2021, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2021, 4:26 AM
This revision is now accepted and ready to land.May 7 2021, 10:21 AM