[PATCH] D102767: [RISCV] Ensure small mask BUILD_VECTORs aren't expanded
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 06:12:27 PDT 2021
frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, HsiangKai, khchen, arcbbb, rogfer01, evandro.
Herald added subscribers: 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.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
The default expansion for BUILD_VECTORs -- save for going through
shuffles -- is to go through the stack. This method only works when the
type is at least byte-sized, so for v2i1 and v4i1 we would crash.
This patch ensures that small mask-type BUILD_VECTORs are always handled
without crashing. We lower to a SETCC of the equivalent i8 type.
This also exposes some pre-existing issues where the lowering when
optimizing for size results in larger code than without. Those will be
tackled in future patches.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102767
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-buildvec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102767.346427.patch
Type: text/x-patch
Size: 14666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210519/47346866/attachment.bin>
More information about the llvm-commits
mailing list