TejaX-Alaghari wrote: @krzysz00 & @jayfoad, I've re-implemented the original mechanism in `AMDGPUCodeGenPrepare` now. Can you please take a look again now and let me know your suggestions, thanks! https://github.com/llvm/llvm-project/pull/160496