[all-commits] [llvm/llvm-project] d65e8e: [RISCV] Add more cmov isel patterns to handle sete...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Jan 22 14:57:09 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d65e8ee507f82ddca018267d0ce627518dd07337
      https://github.com/llvm/llvm-project/commit/d65e8ee507f82ddca018267d0ce627518dd07337
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInstrInfoB.td
    M llvm/test/CodeGen/RISCV/select-optimize-multiple.ll

  Log Message:
  -----------
  [RISCV] Add more cmov isel patterns to handle seteq/ne with a small non-zero immediate.

Similar to our free standing setcc patterns, we can use ADDI to
subtract the immediate from the other operand. Then the cmov
can check if the result is zero or non-zero.

Reviewed By: mundaym

Differential Revision: https://reviews.llvm.org/D95169




More information about the All-commits mailing list