[PATCH] D64155: GlobalISel: Handle widenScalar of arbitrary G_MERGE_VALUES sources

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 13:23:12 PDT 2019


arsenm created this revision.
arsenm added reviewers: paquette, aemerson, aditya_nandakumar.
Herald added subscribers: Petar.Avramovic, volkan, rovka, nhaehnle, wdng, jvesely.
arsenm added a parent revision: D64138: GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES.

Extract the sources to the GCD of the original size and target size,
padding with implicit_def as necessary.

      

Also fix the case where the requested source type is wider than the
original result type. This was ignoring the type, and just using the
destination. Do the operation in the requested type and truncate back.


https://reviews.llvm.org/D64155

Files:
  include/llvm/Support/MathExtras.h
  lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
  unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64155.207875.patch
Type: text/x-patch
Size: 37470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190703/123cecfa/attachment.bin>


More information about the llvm-commits mailing list