[all-commits] [llvm/llvm-project] 75c64c: [RISCV] Don't use li+sh3add for constants that can...
Craig Topper via All-commits
all-commits at lists.llvm.org
Fri Aug 5 12:47:16 PDT 2022
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-08-05 (Fri, 05 Aug 2022)
[RISCV] Don't use li+sh3add for constants that can use lui+add.
If we're adding a constant that can't use addi we try a few tricks,
one of which is using li+sh3add. We should not do this if lui+add
would work. For example adding 8192. Using sh3add prevents folding
a sext.w to form addw, thus increasing instruction count.
More information about the All-commits