Lukacma wrote: I cleaned it up in this patch and added capability to see through bitcasts. Not sure if that is necessary for all cases, but it might happen in certain situations. https://github.com/llvm/llvm-project/pull/83001