[all-commits] [llvm/llvm-project] f7b096: [RISCV] Add more div by constant test cases.
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Dec 28 19:01:25 PST 2021
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-12-28 (Tue, 28 Dec 2021)
[RISCV] Add more div by constant test cases.
Some constants require more instructions than others. This adds
additional test for each variation. UDIV has 2 variations, SDIV has
Some of these sequence may have gotten worse on RV32 when we started
doing the div by constant optimization before type legalization. We
materialized a smaller constant, but we require more instructions
to emulate 8 or 16 bit right shifts. This was hidden by the lack
of test coverage.
I've also added Zba and Zbb test cases to show the affect of sext.b,
sext.h, zext.h, and zext.w on some of the shifts. In some cases
we end up generating more code after the multiply because we use
a zext.h+srli and sext.h+srai where without Zbb we share a slli
between a srli and srai.
More information about the All-commits