[PATCH] D96443: [RISCV] Add support for integer fixed vector setcc and storing a mask vector.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 12:06:34 PST 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, evandro, HsiangKai, khchen, arcbbb, rogfer01.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

I believe I've covered all orderings of splat operands here. Better
canonicalization in lowering might help reduce this. I did not handle
the immediate adjustments needed for set(u)gt/set(u)lt.

Testing here is limited to byte types because the scalable vector
type used for masks for the store is calculated assuming 8 byte
elements. But for the setcc its based on the element count of the
container type for the setcc input. So they don't agree. We'll need
to enhanced D96352 <https://reviews.llvm.org/D96352> to handle this I think.

Once we have mask sign/zero extend support we can probably also avoid
these mask stores in the test. I may have made a bad patch order
decision here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96443

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-setcc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96443.322782.patch
Type: text/x-patch
Size: 38867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210210/c6b72451/attachment.bin>


More information about the llvm-commits mailing list