[all-commits] [llvm/llvm-project] 7cdb1d: [AMDGPU] Divergence driven selection for fused bit...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Mon Oct 18 01:44:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7cdb1df8c70425b30905418636f9008cf8d3a844
      https://github.com/llvm/llvm-project/commit/7cdb1df8c70425b30905418636f9008cf8d3a844
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2021-10-18 (Mon, 18 Oct 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SOPInstructions.td
    M llvm/lib/Target/AMDGPU/VOP3Instructions.td
    M llvm/test/CodeGen/AMDGPU/fused-bitlogic.ll

  Log Message:
  -----------
  [AMDGPU] Divergence driven selection for fused bitlogic

The change adds divergence predicates for fused logical operations.
The problem with selecting a scalar fused op such as S_NOR_B32 is
that it does not have a VALU counterpart and will be split in
moveToVALU. At the same time it prevents selection of a better
opcode on the VALU side (such as V_OR3_B32) which does not have a
counterpart on SALU side.

XNOR opcodes are left as is and selected as scalar to get advantage
of the SIInstrInfo::lowerScalarXnor() code which can commute
operations to keep one of two opcodes on SALU if possible. See
xnor.ll test for this.

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




More information about the All-commits mailing list