[all-commits] [llvm/llvm-project] 17ce61: AMDGPU: Fix null dereference in getInstructionUnif...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Jan 30 11:47:33 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 17ce615c781f854b6247ea4995bd50f967d1b699
      https://github.com/llvm/llvm-project/commit/17ce615c781f854b6247ea4995bd50f967d1b699
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

  Log Message:
  -----------
  AMDGPU: Fix null dereference in getInstructionUniformity

This was failing when it couldn't find an allocatable class
for special physical register inputs (like $mode), which are all
scalars.

This avoids numerous test failures when regbankselect is updated
to use uniformity analysis.


  Commit: 490e348e67945a4a7e118709579f17b2c96b40bd
      https://github.com/llvm/llvm-project/commit/490e348e67945a4a7e118709579f17b2c96b40bd
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/RegisterBankInfo.h
    M llvm/lib/CodeGen/RegisterBankInfo.cpp
    M llvm/lib/Target/AMDGPU/GCNSubtarget.h
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

  Log Message:
  -----------
  AMDGPU: Partially fix machine uniformity for inline asm

This was assuming virtual registers only, and asserting on physical.
This was also ignoring AGPRs, and only considering VGPRs.

Reporting the instruction as uniform or not is conceptually wrong,
this should be reported per-operand. An inline asm statement could
include uniform and non-uniform components. This should report
purely for the register defs and ignore the uses.

Fixes asserting on most of the inline asm tests when uniformity
analysis is used.


  Commit: 40025761564bae5b62c38745ed6edc2667419591
      https://github.com/llvm/llvm-project/commit/40025761564bae5b62c38745ed6edc2667419591
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

  Log Message:
  -----------
  AMDGPU/GlobalISel: Partially fix getGenericInstructionUniformity

This was broken for the common case of instructions which are uniform
if their inputs are uniform. This is broken for control flow intrinsics
since the API currently does not express which result operand is in question.

This generates failures in just about every intrinsic test when uniformity
analysis is performed without this.


Compare: https://github.com/llvm/llvm-project/compare/5c6cb61ad416...40025761564b


More information about the All-commits mailing list