[all-commits] [llvm/llvm-project] ee1a69: GlobalISel: Combine G_UNMERGE_VALUES with G_TRUNC

Matt Arsenault via All-commits all-commits at lists.llvm.org
Sat May 9 13:14:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ee1a69824d9a9fceea2b51616c3363c4d210af4c
      https://github.com/llvm/llvm-project/commit/ee1a69824d9a9fceea2b51616c3363c4d210af4c
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-05-09 (Sat, 09 May 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-select.mir
    M llvm/test/CodeGen/AArch64/arm64-vabs.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-sext.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-or.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sext-inreg.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-trunc.mir
    R llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values-xfail.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-xor.mir

  Log Message:
  -----------
  GlobalISel: Combine G_UNMERGE_VALUES with G_TRUNC

G_BITCAST can be lowered with a pair of G_UNMERGE_VALUES and
G_MERGE_VALUES with different types, but G_UNMERGE_VALUES of a vector
can also be implemented with a bitcast to a scalar, which introduces
the possibility for infinite loops. Try to eliminate an illegal source
register type in the artifact combiner to avoid this from happening.

Avoids infinite looping in the legalizer in a future patch which
allows lowering G_UNMERGE_VALUES of a vector source with a G_BITCAST.




More information about the All-commits mailing list