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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
870 ms | x64 debian > libomp.lock::omp_init_lock.c |
Event Timeline
Comment Actions
LGTM but please add a description of the optimization so that once it is committed it can be understood from git log without needing to read the patch.
Comment Actions
Minimize number of virtual registers used to match current version of getVLENFactoredAmount
Comment Actions
Sorry, I’m writing my undergraduate thesis recently, so I don’t have time to deal with this patch, thank you for helping me deal with it.
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | ||
---|---|---|
1394 | I saw a test failing downstream due to this. This should be addImm(ShiftAmount) |
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | ||
---|---|---|
1394 |
I saw a test failing downstream due to this. This should be addImm(ShiftAmount)