[PATCH] D97811: [GlobalISel] Handle non-multiples of the base type in narrowScalarAddSub

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 14:57:20 PST 2021


bogner created this revision.
bogner added reviewers: arsenm, aemerson, 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_ADD and G_SUB, handle types that aren't a multiple of
the type we're narrowing to. This allows us to handle types like s96
on 64 bit targets.

Note that the test here has a couple of dead instructions because of
the way the setup legalizes. I wasn't able to come up with a way to
write this test that avoids that easily.

Depends on D97791 <https://reviews.llvm.org/D97791>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97811

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97811.327600.patch
Type: text/x-patch
Size: 6245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210302/85f03b29/attachment.bin>


More information about the llvm-commits mailing list