[all-commits] [llvm/llvm-project] d70e91: [RISCV] Optimize getVLENFactoredAmount function.
luxufan via All-commits
all-commits at lists.llvm.org
Mon May 24 10:06:25 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d70e9195a3339a6d56ed46ad4b8b467a0053322a
https://github.com/llvm/llvm-project/commit/d70e9195a3339a6d56ed46ad4b8b467a0053322a
Author: luxufan <932494295 at qq.com>
Date: 2021-05-24 (Mon, 24 May 2021)
Changed paths:
M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
M llvm/test/CodeGen/RISCV/rvv/allocate-lmul-2-4-8.ll
M llvm/test/CodeGen/RISCV/rvv/rvv-framelayout.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list