[all-commits] [llvm/llvm-project] 37b41b: [RISCV] Add scalable vector fcmp ISel patterns

Fraser Cormack via All-commits all-commits at lists.llvm.org
Mon Jan 11 11:45:23 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37b41bd0879e8ed1a07a6fc401a2b56dcd6f124c
      https://github.com/llvm/llvm-project/commit/37b41bd0879e8ed1a07a6fc401a2b56dcd6f124c
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2021-01-11 (Mon, 11 Jan 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
    A llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv32.ll
    A llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv64.ll
    A llvm/test/CodeGen/RISCV/rvv/vsplats-fp.ll

  Log Message:
  -----------
  [RISCV] Add scalable vector fcmp ISel patterns

Original patch by @rogfer01.

All ordered comparisons except ONE are supported natively, and all
unordered comparisons except UNE are expanded into sequences involving
explicit NaN checks and mask arithmetic.

Additionally, we expand GT,OGT,GE,OGE to their swapped-operand versions, and
pattern-match those back to the "original", swapping operands once more. This
way we catch both operations and both "vf" and "fv" forms with fewer patterns.

Also add support for floating-point splat_vector, with an optimization for
splatting fpimm0.

Authored-by: Roger Ferrer Ibanez <rofirrim at gmail.com>
Co-Authored-by: Fraser Cormack <fraser at codeplay.com>

Reviewed By: craig.topper

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




More information about the All-commits mailing list