[all-commits] [llvm/llvm-project] fbae34: [GlobalISel] Add combine for PTR_ADD with regbanks

Sebastian Neubauer via All-commits all-commits at lists.llvm.org
Tue Aug 17 04:58:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbae34635d83c106f99ccd11a53305915929bb9a
      https://github.com/llvm/llvm-project/commit/fbae34635d83c106f99ccd11a53305915929bb9a
  Author: Sebastian Neubauer <sebastian.neubauer at amd.com>
  Date:   2021-08-17 (Tue, 17 Aug 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUCombine.td
    M llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll

  Log Message:
  -----------
  [GlobalISel] Add combine for PTR_ADD with regbanks

Combine two G_PTR_ADDs, but keep the register bank of the constant.
That way, the combine can be used in post-regbank-select combines.

Introduce two helper methods in CombinerHelper, getRegBank and
setRegBank that get and set an optional register bank to a register.
That way, they can be used before and after register bank selection.

Differential Revision: https://reviews.llvm.org/D103326




More information about the All-commits mailing list