[PATCH] D148647: [RISCV] Fix interleave crash on unary interleaves

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 10:32:35 PDT 2023


luke created this revision.
luke added reviewers: craig.topper, reames.
Herald added subscribers: jobnoorman, asb, pmatos, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

We were crashing when lowering interleave shuffles like
(shuffle <0,3,1,4>, x:v4i8, y:v4i8)
Where it was technically an unary shuffle (both EvenSrc and OddSrc point
to the first operand), but the resulting extract_subvectors were out of
bounds.
This checks to make sure that the vectors being extracted are within
range.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148647

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148647.514683.patch
Type: text/x-patch
Size: 5219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230418/d67e0b93/attachment.bin>


More information about the llvm-commits mailing list