[all-commits] [llvm/llvm-project] 8d7fd7: [AMDGPU] Fix merging m0 inits

Piotr Sobczak via All-commits all-commits at lists.llvm.org
Wed Sep 23 00:15:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d7fd73c3a8ce069cfe48dfcf949b4a59c05c673
      https://github.com/llvm/llvm-project/commit/8d7fd73c3a8ce069cfe48dfcf949b4a59c05c673
  Author: Piotr Sobczak <Piotr.Sobczak at amd.com>
  Date:   2020-09-23 (Wed, 23 Sep 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
    M llvm/test/CodeGen/AMDGPU/merge-m0.mir

  Log Message:
  -----------
  [AMDGPU] Fix merging m0 inits

Fix incorrect merges of m0 inits in loops.

It was assumed that if a clobbering instruction appears in
the same block as an init and the clobbering instruction
does not dominate the init then it does not interfere with
init.

This does not work in the presence of loops, where in this
scenario, the clobbering instruction does interfere with
the init in another iteration.

To fix this, do not check for block equality and defer the
decision to the predecessor check.

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




More information about the All-commits mailing list