[all-commits] [llvm/llvm-project] 802045: [AMDGPU] Changing S_AND_B32 to V_AND_B32_e64 in th...

alex-t via All-commits all-commits at lists.llvm.org
Fri Dec 24 07:22:36 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8020458c5dc2be841c07d26ff75b5471314e6631
      https://github.com/llvm/llvm-project/commit/8020458c5dc2be841c07d26ff75b5471314e6631
  Author: alex-t <alexander.timofeev at amd.com>
  Date:   2021-12-24 (Fri, 24 Dec 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/lib/Target/AMDGPU/VOPInstructions.td
    A llvm/test/CodeGen/AMDGPU/divergence-driven-trunc-to-i1.ll

  Log Message:
  -----------
  [AMDGPU] Changing S_AND_B32 to V_AND_B32_e64 in the divergent 'trunc' to i1  pattern

In 'trunc' i16/32/64 to i1 pattern the 'and $src, 1' node supply operand to 'setcc'.
The latter is selected to S_CMP_EQ/V_CMP_EQ dependent on the divergence. In case the 'and' is scalar
and 'setcc' is divergent, we need VGPR to SGPR copy to adjust input operand for V_CMP_EQ.
This patch changes the S_AND_B32 to V_AND_B32_e64 in the 'trunc to i1' divergent patterns.

Reviewed By: rampitec

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




More information about the All-commits mailing list