[all-commits] [llvm/llvm-project] e637fe: [RISCV] Add isel pattern for (setne/eq GPR, -2048)

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Jul 29 14:08:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e637feee80f94d23950d25673b6c2e0d46d335a9
      https://github.com/llvm/llvm-project/commit/e637feee80f94d23950d25673b6c2e0d46d335a9
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfo.td
    M llvm/test/CodeGen/RISCV/i32-icmp.ll
    M llvm/test/CodeGen/RISCV/i64-icmp.ll

  Log Message:
  -----------
  [RISCV] Add isel pattern for (setne/eq GPR, -2048)

For constants in the range [-2047, 2048] we use addi. If the constant
is -2048 we can use xori. If we don't match this explicitly, we'll
emit an LI for the -2048 followed by an XOR.




More information about the All-commits mailing list