[all-commits] [llvm/llvm-project] fdbd5d: [RISCV] Fold (select_cc (xor X, Y), 0, eq/ne, true...

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Mar 7 09:36:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fdbd5d32060c50313493fbdbbea74dc9ea73b591
      https://github.com/llvm/llvm-project/commit/fdbd5d32060c50313493fbdbbea74dc9ea73b591
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-07 (Sun, 07 Mar 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/sadd_sat.ll
    M llvm/test/CodeGen/RISCV/sadd_sat_plus.ll
    M llvm/test/CodeGen/RISCV/ssub_sat.ll
    M llvm/test/CodeGen/RISCV/ssub_sat_plus.ll
    M llvm/test/CodeGen/RISCV/xaluo.ll

  Log Message:
  -----------
  [RISCV] Fold (select_cc (xor X, Y), 0, eq/ne, trueV, falseV) -> (select_cc X, Y, eq/ne, trueV, falseV)

This pattern occurs when lowering for overflow operations
introduce an xor after select_cc has already been formed.

I had to rework another combine that looked for select_cc of an xor
with 1. That xor will now get combined away so we just need to
look for the RHS of the select_cc being 1.

Reviewed By: luismarques

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




More information about the All-commits mailing list