[llvm] [AMDGPU] Save/Restore SCC bit across waterfall loop. (PR #68363)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 02:00:38 PDT 2023


jayfoad wrote:

I have no comments on this patch, but I do think we should plan to improve waterfall formation in the future in a way that will make this patch obsolete.

Fundamentally we should not be forming waterfall loops in `moveToVALU`. That decision should be made during instruction selection, where we have accurate divergence information for buffer descriptors. ISel could either emit different opcodes for "buffer load with/without waterfall loop", or it could emit some extra pseudos marking the start/end of a required waterfall loop. In either case the emitted instructions can accurately say whether they will clobber SCC, and they can be expanded to real control flow in EmitInstrWithCustomInserter.

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


More information about the llvm-commits mailing list