[llvm] [AMDGPU] Prevent cyclic behaviour in SIFoldOperands (PR #82099)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 03:51:27 PST 2024


jayfoad wrote:

> In SIFoldOperands::foldOperand, the recursion in REG_SEQUENCE handling could result in infinite loop if UseMI and RSUseMI share a common use operand, flipflopping between two instructions until stack overflows. The fix is to prevent a cycle by using static seenMI set.

What does "share a common use operand" mean? Are you saying instruction A uses the result of B, and B uses the result of A? Is there a PHI involved?

https://github.com/llvm/llvm-project/pull/82099


More information about the llvm-commits mailing list