[RISCV] Optimize getVLENFactoredAmount function.
If the local variable `NumOfVReg` isPowerOf2_32(NumOfVReg - 1) or isPowerOf2_32(NumOfVReg + 1), the ADDI and MUL instructions can be replaced with SLLI and ADD(or SUB) instructions. Based on original patch by StephenFan. Reviewed By: frasercrmck, StephenFan Differential Revision: https://reviews.llvm.org/D100577
Loading
Please sign in to comment