HomePhabricator

[RISCV] Add a pass to remove duplicate VSETVLI instructions in a basic block.

Authored by craig.topper on Dec 11 2020, 10:34 AM.

Description

[RISCV] Add a pass to remove duplicate VSETVLI instructions in a basic block.

Add simple pass for removing redundant vsetvli instructions within a basic block. This handles the case where the AVL register and VTYPE immediate are the same and no other instructions that change VTYPE or VL are between them.

There are going to be more opportunities for improvement in this space as we development more complex tests.

Differential Revision: https://reviews.llvm.org/D92679