[PATCH] D64138: GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 08:51:18 PDT 2019


arsenm created this revision.
arsenm added reviewers: paquette, aemerson, aditya_nandakumar.
Herald added subscribers: Petar.Avramovic, volkan, rovka, nhaehnle, wdng, jvesely.

Use an anyext to the requested type for the leftover operand to
produce a slightly wider type, and then truncate the final merge.

      

I have another implementation almost ready which handles arbitrary
widens, but I think it produces worse code in this example (which I
think is 90% due to not folding redundant copies or folding out
implicit_def users), so I wanted to add this as a baseline first.


https://reviews.llvm.org/D64138

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64138.207809.patch
Type: text/x-patch
Size: 6686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190703/861c150e/attachment-0001.bin>


More information about the llvm-commits mailing list