HomePhabricator

[RISCV] Teach VSETVLI inserter to use VSETIVLI when possible.

Authored by craig.topper on Feb 24 2021, 4:07 PM.

Description

[RISCV] Teach VSETVLI inserter to use VSETIVLI when possible.

We always create the VL operand using a register, but if we can
determine that it came from an ADDI X0, imm with a sufficiently
small immediate, we can use VSETIVLI.

Reviewed By: frasercrmck

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