[all-commits] [llvm/llvm-project] 52ba4f: [GlobalISel] Avoid making G_PTR_ADD with nullptr

Mirko BrkuĊĦanin via All-commits all-commits at lists.llvm.org
Tue Oct 13 04:04:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 52ba4fa6aa21953a0d90c0c6e25a3ed95708d08b
      https://github.com/llvm/llvm-project/commit/52ba4fa6aa21953a0d90c0c6e25a3ed95708d08b
  Author: Mirko Brkusanin <Mirko.Brkusanin at amd.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
    M llvm/include/llvm/Target/GlobalISel/Combine.td
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    A llvm/test/CodeGen/AMDGPU/GlobalISel/combine-add-nullptr.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.dec.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.inc.ll

  Log Message:
  -----------
  [GlobalISel] Avoid making G_PTR_ADD with nullptr

When the first operand is a null pointer we can avoid making a G_PTR_ADD and
make a G_INTTOPTR with the offset operand.
This helps us avoid making add with 0 later on for targets such as AMDGPU.

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




More information about the All-commits mailing list