[PATCH] D123051: [RISCV][VP] Add basic RVV codegen for vp.fcmp
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 10:34:23 PDT 2022
frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, rogfer01, simoll.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, dexonsmith, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123051
Files:
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/include/llvm/IR/VPIntrinsics.def
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-setcc-fp-vp.ll
llvm/test/CodeGen/RISCV/rvv/setcc-fp-vp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123051.420229.patch
Type: text/x-patch
Size: 187562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220404/af40cc45/attachment-0001.bin>
More information about the llvm-commits
mailing list