[all-commits] [llvm/llvm-project] 821625: [RISCV][VP] Add basic RVV codegen for vp.fcmp

Fraser Cormack via All-commits all-commits at lists.llvm.org
Thu Apr 7 01:27:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8216255c9ff8b12969713000fdbae56f81be1915
      https://github.com/llvm/llvm-project/commit/8216255c9ff8b12969713000fdbae56f81be1915
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/SelectionDAG.h
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/include/llvm/IR/VPIntrinsics.def
    M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
    A llvm/test/CodeGen/RISCV/rvv/fixed-vectors-setcc-fp-vp.ll
    A llvm/test/CodeGen/RISCV/rvv/setcc-fp-vp.ll

  Log Message:
  -----------
  [RISCV][VP] Add basic RVV codegen for vp.fcmp

This patch adds the necessary infrastructure to lower vp.fcmp via
ISD::VP_SETCC to RVV instructions.

Most notably this patch adds cond-code legalization for VP_SETCC,
reusing the existing TargetLowering::LegalizeSetCCCondCode by passing in
additional SDValue parameters for the Mask and EVL. This method then
uses VP operations to legalize the condcode.

There is still a general lack of canonicalization on VP_SETCC as opposed
to SETCC which results in worse code than is theoretically possible.

Reviewed By: craig.topper

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




More information about the All-commits mailing list