This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Lower RVV vector SELECTs to VSELECTs
ClosedPublic

Authored by frasercrmck on Jun 23 2021, 2:23 AM.

Details

Summary

This patch optimizes the code generation of vector-type SELECTs (LLVM
select instructions with scalar conditions) by custom-lowering to
VSELECTs (LLVM select instructions with vector conditions) by splatting
the condition to a vector. This avoids the default expansion path which
would either introduce control flow or fully scalarize.

Diff Detail

Event Timeline

frasercrmck created this revision.Jun 23 2021, 2:23 AM
frasercrmck requested review of this revision.Jun 23 2021, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 2:23 AM
  • add missing changes for mask vectors
This revision is now accepted and ready to land.Jun 23 2021, 8:27 AM
This revision was automatically updated to reflect the committed changes.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp