[llvm] [AMDGPU] Mark `SI_WATERFALL_LOOP` as divergent in `hasDivergentBranch` (PR #218969)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 06:58:05 PDT 2026
https://github.com/ruiling approved this pull request.
Yes, this makes sense to me. It would be better to add a few words in the description instead of the less helpful ones `This prevents incorrect sinking out of the waterfall loops.`.
When a vector instruction takes SGPR source operand, sinking it out of loop with divergent exit would cause the vector instruction to get the value from the last iteration in the SGPR. Actually, it should stay in the loop and take maybe different values per each iteration.
https://github.com/llvm/llvm-project/pull/218969
More information about the llvm-commits
mailing list