[all-commits] [llvm/llvm-project] 18839a: [AMDGPU] Detect kills in register sets when trying...

Thomas Symalla via All-commits all-commits at lists.llvm.org
Thu Nov 2 02:36:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18839aec4ed1977142444d650bf6c74c705fee44
      https://github.com/llvm/llvm-project/commit/18839aec4ed1977142444d650bf6c74c705fee44
  Author: Thomas Symalla <5754458+tsymalla at users.noreply.github.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
    A llvm/test/CodeGen/AMDGPU/vcmp-saveexec-to-vcmpx-set-kill.mir

  Log Message:
  -----------
  [AMDGPU] Detect kills in register sets when trying to form V_CMPX instructions. (#68293)

During the SIOptimizeExecMasking pass, we try to form V_CMPX
instructions by detecting S_AND_SAVEEXEC and V_MOV instructions.
Generally, we require the input operand of the V_MOV, which is the input
operand to the to-be-formed V_CMPX, to be alive. This is forced by
clearing the kill flags on the operand after V_CMPX has been generated.

However, if we have a kill of a register set that contains said
register, this will not be detected by clearKillFlags.
With this change, possible additional kill-flag candidates will be
detected during the final call to findInstrBackwards and then, the kill
flag will be removed to keep all registers in the set alive.

Co-authored-by: Thomas Symalla <thomas.symalla at amd.com>




More information about the All-commits mailing list