[PATCH] D97791: [GlobalISel] Handle non-multiples of the base type in narrowScalarInsert

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 11:17:29 PST 2021


bogner created this revision.
bogner added reviewers: aemerson, arsenm, dsanders, volkan.
Herald added subscribers: hiraditya, rovka, mcrosier.
bogner requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

When narrowing G_INSERT, handle types that aren't a multiple of the
type we're narrowing to. This comes up if we're narrowing something
like an s96 to fit in 64 bit registers and also for non-byte multiple
packed types if they come up.

This implementation handles these cases by extending the extra bits to
the narrow size and truncating the result back to the destination
size.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97791

Files:
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97791.327526.patch
Type: text/x-patch
Size: 8658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210302/410b8fbb/attachment.bin>


More information about the llvm-commits mailing list