[all-commits] [llvm/llvm-project] fc06a4: AMDGPU: Add a test to show bad compilation to set_...

Ruiling, Song via All-commits all-commits at lists.llvm.org
Thu Apr 6 18:11:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fc06a429aae137c086ca45e3537eccb0e8128698
      https://github.com/llvm/llvm-project/commit/fc06a429aae137c086ca45e3537eccb0e8128698
  Author: Ruiling Song <ruiling.song at amd.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    A llvm/test/CodeGen/AMDGPU/should-not-hoist-set-inactive.ll

  Log Message:
  -----------
  AMDGPU: Add a test to show bad compilation to set_inactive

The set_inactive was originally inside a if branch, but was incorrectly
hoisted out of the loop. So the lanes that were disabled later after the
if() branch inside the loop were not set correctly. It should stay in
the if branch.

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


  Commit: 2ab6835f285fbb231e90658c1c8c727defb03d9a
      https://github.com/llvm/llvm-project/commit/2ab6835f285fbb231e90658c1c8c727defb03d9a
  Author: Ruiling Song <ruiling.song at amd.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/test/CodeGen/AMDGPU/should-not-hoist-set-inactive.ll

  Log Message:
  -----------
  AMDGPU: mark SET_INACTIVE_* as convergent operation

set_inactive is actually a kind of operation that is passing certain
value from active threads to inactive threads. In later WWM operation,
the activated threads which were disabled before would read such
values passed to them by set_inactive operation. So I think the
set_inactive is a convergent operation.

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


Compare: https://github.com/llvm/llvm-project/compare/bf9de4cf1310...2ab6835f285f


More information about the All-commits mailing list