hliao marked an inline comment as done. hliao added inline comments.
================ Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:237-239 + TTI->isNoopAddrSpaceCast( + P2I->getOperand(0)->getType()->getPointerAddressSpace(), + I2P->getType()->getPointerAddressSpace()); ---------------- arsenm wrote: > Can you also elaborate on why the isNoopAddrSpaceCast check is needed? I'm > not 100% sure it is in all contexts, so want to be sure to document that As we may convert a pair of ptr/int casts into an `addrspacecast` if both of them are no-op casts, if that's not a no-op `addrspacecast` under a specific target, we may introduce an invalid `addrspacecast` based on the current IR spec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81938/new/ https://reviews.llvm.org/D81938 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits