[llvm] [RISCV] Addi optimization ported to GISel (PR #120463)

Luke Quinn via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 10:45:17 PST 2024


lquinn2015 wrote:

You can diff the add-imm.ll and the GISel/add-imm.ll   they are different but I believe they are correct. The only difference seems to be that the GISel path seems to be favoring addiw over addi. In this test case there is no difference due to the value of the constants.


@benshi001  or @topperc   I had one question about the add64_accept test.   I don't really understand what the point of the sltu instruction in that cases is but both GISel and ISel have that instruction. It seems like it shouldn't be there in either or am I missing a overflow check semantic or something?

https://github.com/llvm/llvm-project/pull/120463


More information about the llvm-commits mailing list