[PATCH] D113219: [RISCV] Prevent crashes when bitcasting between fixed vectors and scalars.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 15:24:58 PDT 2021


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

Not all scalar element types are allowed in vectors so we may not
be able to bitcast to a 1 element vector to use insert/extract.

This will become a bigger issue when the Zve extensions are commited.
For now, I'm using the ELEN limit to limit the element types.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113219

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113219.384884.patch
Type: text/x-patch
Size: 15788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211104/548344af/attachment.bin>


More information about the llvm-commits mailing list