[PATCH] D61787: [GlobalISel Legalizer] Improve artifact combiner

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 06:34:54 PDT 2019


Petar.Avramovic updated this revision to Diff 211488.
Petar.Avramovic added a comment.

Updated regression tests.

Since there is a lot of long comments here, I opened new RFC thread D65199 <https://reviews.llvm.org/D65199>.
There is full -debug output there for two simple test functions so that we can have better overview of the changes this patch brings.

Some thoughts about G_CONSTANT widen scalar.
We don't know how to perform widen scalar, i.e. do we zero or sign extend immediate. What we could do, if this patch gets accepted, is to remove G_CONSTANT widen scalar, and introduce G_SEXT/G_ZEXT/G_ANYEXT + G_CONSTANT combine. G_CONSTANT would be auxiliary artifact (or even have dedicated constList for constants) so that it processed after everything else. It still needs narrowScalar and when is legal but what is currently widen scalar could be handled with artifact combines.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61787/new/

https://reviews.llvm.org/D61787

Files:
  include/llvm/CodeGen/GlobalISel/GISelWorkList.h
  lib/CodeGen/GlobalISel/Legalizer.cpp
  test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
  test/CodeGen/AArch64/GlobalISel/legalize-unmerge-values.mir
  test/CodeGen/AArch64/GlobalISel/legalizer-combiner-zext-trunc-crash.mir
  test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-sext.mir
  test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
  test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-zext.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-fcopysign.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-icmp.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-implicit-def.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-or.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values-xfail.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
  test/CodeGen/AMDGPU/GlobalISel/legalize-xor.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61787.211488.patch
Type: text/x-patch
Size: 100633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190724/9ac34b03/attachment-0001.bin>


More information about the llvm-commits mailing list