gangche1 added a comment. isNoopAddrspaceCast is what I am looking for. Could I use that in this InferAddressSpace pass to get rid of a NoopAddrSpaceCast that is used by ptrtoint? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72941/new/ https://reviews.llvm.org/D72941