[PATCH] D76494: [GlobalISel] support widen unmerge if WideTy > SrcTy

Dominik Montada via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 07:00:16 PDT 2020


gargaroff created this revision.
gargaroff added reviewers: arsenm, dsanders, aemerson, aditya_nandakumar.
Herald added subscribers: llvm-commits, kerbowa, volkan, hiraditya, rovka, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.
gargaroff added a comment.

I'm not sure why this case was unsupported so far, when it looks to be really trivial. Please let me know if I'm not seeing some larger implications with this!


Widening G_UNMERGE_VALUES to a type which is larger than the
original source type is the same as widening it to the same
type as the source type: in both cases, G_UNMERGE_VALUES has
to be replaced with bit arithmetic which. Although the arithmetic
itself is independent of whether the source type is smaller
or equal to the widen type, widening the source type to the
widen type should result in less artifacts being emitted,
since this is the type that the user explicitly requested.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76494

Files:
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
  llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76494.251623.patch
Type: text/x-patch
Size: 10028 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200320/c53d56cf/attachment.bin>


More information about the llvm-commits mailing list