[PATCH] D155343: MachineSink: Fix sinking VGPR def out of a divergent loop

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 15:59:24 PDT 2023


arsenm added a comment.

In D155343#4517032 <https://reviews.llvm.org/D155343#4517032>, @ruiling wrote:

> I think a more accurate description of the real problem is: sinking vgpr def which has a loop-variant sgpr source out of divergent loop is wrong for AMDGPU. For other cases, it is still legal to move out of loop. The problem is not specific to nested loops, it also applies to single loop. The test case has been over-simplified and does not show original problem (both .ll and .mir test). We can keep the code as now, but I still think it's better to update the tests to show the real problem to make it easy to revisit the issue.

What do you suggest? I think we need to come up with a way to properly model this


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155343/new/

https://reviews.llvm.org/D155343



More information about the llvm-commits mailing list