amd-subharad wrote: Thank you @MattPD for your detailed reviews, I have fixed the cases you mentioned and also handled additional scenarios. Please let me know if there are any shortcomings with this. https://github.com/llvm/llvm-project/pull/220565