[all-commits] [llvm/llvm-project] 824706: [RISCV] Support (truncate (smin (smax X, C1), C2))...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu May 30 13:41:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8247068b70106d188d037b9cc4b8de3548108597
      https://github.com/llvm/llvm-project/commit/8247068b70106d188d037b9cc4b8de3548108597
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-05-30 (Thu, 30 May 2024)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-trunc-sat-clip.ll
    M llvm/test/CodeGen/RISCV/rvv/fpclamptosat_vec.ll
    M llvm/test/CodeGen/RISCV/rvv/trunc-sat-clip-sdnode.ll

  Log Message:
  -----------
  [RISCV] Support (truncate (smin (smax X, C1), C2)) for vnclipu in combineTruncToVnclip. (#93756)

If the smax removed all negative numbers, then we can treat the smin
like a umin.

If the smin and smax are in the other order we can swap them and use a
vnclipu as long as the smax constant is smaller than the smin constant.

This is based on similar code from X86's detectUSatPattern.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list