[all-commits] [llvm/llvm-project] 212570: GlobalISel: Implement bitcast action for G_EXTRACT...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Sun Aug 2 07:42:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 212570abcf755b8577a7aec80777503232d36d77
      https://github.com/llvm/llvm-project/commit/212570abcf755b8577a7aec80777503232d36d77
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-08-02 (Sun, 02 Aug 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    A llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i128.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i16.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i8.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.dim.a16.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shuffle-vector.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shuffle-vector.s16.mir

  Log Message:
  -----------
  GlobalISel: Implement bitcast action for G_EXTRACT_VECTOR_ELEMENT

For AMDGPU, vectors with elements < 32 bits should be indexed in
32-bit elements and the desired bits extracted from there. For
elements > 64-bits, these should be reduce to 64/32 elements to enable
the normal dynamic indexing paths.

In the dynamic index cases, this produces shorter code most of the
time. This does immediately regress the constant index cases, but this
should be fixed once we have the most basic of shift combines.

The element size > 64 case is pretty much ported from the exisiting
DAG implementation for extract element promote. The increasing element
size case is new.




More information about the All-commits mailing list