[all-commits] [llvm/llvm-project] a1fb30: [AMDGPU] Allow hoisting of some VALU compare instr...

Carl Ritson via All-commits all-commits at lists.llvm.org
Mon Feb 7 18:28:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1fb307b4b8d5ffd8f66a477783e362e54a3c03c
      https://github.com/llvm/llvm-project/commit/a1fb307b4b8d5ffd8f66a477783e362e54a3c03c
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2022-02-08 (Tue, 08 Feb 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/licm-valu.mir

  Log Message:
  -----------
  [AMDGPU] Allow hoisting of some VALU compare instructions

Conversatively allow hoisting/sinking of VALU comparisons.
If the result of a comparison is masked with exec, narrowing the
set of active lanes, then it is safe to hoist it as the masking
instruction will never by hoisted.

Heuristically this is also true for sinking, as we do not expect
the result of a sunk comparison that is masked with exec to be
used outside of the loop.

Reviewed By: rampitec

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




More information about the All-commits mailing list