[PATCH] D147538: [RISCV] Add DAG combine to fold (sub 0, (setcc x, 0, setlt)) -> (sra x , xlen - 1)

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 08:10:34 PDT 2023


liaolucy updated this revision to Diff 511109.
liaolucy retitled this revision from "[RISCV] Add DAG combine to fold (add (setcc x, 0, setlt), -1) -> (sra x, xlen - 1)" to "[RISCV] Add DAG combine to fold (sub 0, (setcc x, 0, setlt)) -> (sra x , xlen - 1)".
liaolucy edited the summary of this revision.
liaolucy added a comment.

delete the add cases


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147538/new/

https://reviews.llvm.org/D147538

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/alu64.ll
  llvm/test/CodeGen/RISCV/bittest.ll
  llvm/test/CodeGen/RISCV/fpclamptosat.ll
  llvm/test/CodeGen/RISCV/fpclamptosat_vec.ll
  llvm/test/CodeGen/RISCV/rotl-rotr.ll
  llvm/test/CodeGen/RISCV/shift-amount-mod.ll
  llvm/test/CodeGen/RISCV/shift-masked-shamt.ll
  llvm/test/CodeGen/RISCV/shifts.ll
  llvm/test/CodeGen/RISCV/wide-scalar-shift-by-byte-multiple-legalization.ll
  llvm/test/CodeGen/RISCV/wide-scalar-shift-legalization.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147538.511109.patch
Type: text/x-patch
Size: 66698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230405/ce553acb/attachment.bin>


More information about the llvm-commits mailing list