[PATCH] D57653: GlobalISel: Combine g_extract with g_merge_values

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 3 07:22:48 PST 2019


arsenm created this revision.
arsenm added reviewers: aemerson, aditya_nandakumar, volkan, dsanders, paquette, t.p.northover.
Herald added subscribers: Petar.Avramovic, kristof.beyls, javed.absar, rovka, nhaehnle, wdng, jvesely.

Try to use the underlying source registers.

      

This enables legalization in more cases where some irregular
operations are widened and others narrowed.

      

This seems to make the test_combines_2 AArch64 test worse, since the
MERGE_VALUES has multiple uses. Since this should be required for
legalization, a hasOneUse check is probably inappropriate (or maybe
should only be used if the merge is legal?).


https://reviews.llvm.org/D57653

Files:
  include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  lib/CodeGen/GlobalISel/Legalizer.cpp
  test/CodeGen/AArch64/GlobalISel/legalize-combines.mir
  test/CodeGen/AArch64/GlobalISel/legalize-extracts.mir
  test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-extract.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57653.184953.patch
Type: text/x-patch
Size: 26458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190203/72f60863/attachment.bin>


More information about the llvm-commits mailing list