This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use vslidedown.vi vN, vN, 0 instead of vslideup.vi vN, vM, 0 via DAGCombine
AbandonedPublic

Authored by luke on Jun 7 2023, 5:56 AM.

Details

Summary

These instructions are semantically identical in the case where the
offset is 0 with the exception that vslideup has a vector overlap
constraint and vslidedown doesn't. As a result, we can prefer the one
without register overlap constraints to improve register allocation
flexibility.

This patch implements https://reviews.llvm.org/D152298 but as a DAG
combine. It catches a few more cases, including some scalable vectors.

Co-authored-by: preames@rivosinc.com

Diff Detail

Event Timeline

luke created this revision.Jun 7 2023, 5:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2023, 5:56 AM
luke requested review of this revision.Jun 7 2023, 5:56 AM
luke retitled this revision from [RISCV] Use vslidedown.vi vN, vN, 0 instead of vslideup.vi vN, vM, 0 to [RISCV] Use vslidedown.vi vN, vN, 0 instead of vslideup.vi vN, vM, 0 via DAGCombine.Jun 7 2023, 9:13 AM
luke abandoned this revision.Jun 11 2023, 4:09 PM

Abandoned in favour of D152565