2 Commits

Author SHA1 Message Date
Philip Reames
7dbf2e7b57 Teach PeepholeOpt to eliminate redundant copy from constant physreg (e.g VLENB on RISCV)
The existing redundant copy elimination required a virtual register source, but the same logic works for any physreg where we don't have to worry about clobbers.  On RISCV, this helps eliminate redundant CSR reads from VLENB.

Differential Revision: https://reviews.llvm.org/D125564
2022-05-16 16:38:30 -07:00
Philip Reames
0513502a0a [RISCV] Precommit tests showing missed vlenb optimizations 2022-05-13 09:43:11 -07:00