================ @@ -2067,6 +2067,10 @@ Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy, Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy, bool OnlyIfReduced) { + // Skip cast if types are identical ---------------- EthanLuisMcDonough wrote:
`CastInst::castIsValid` returns false for addrspace casts if two pointers share the same addrspace. https://github.com/llvm/llvm-project/blob/2de269a641e4ffbb7a44e559c4c0a91bb66df823/llvm/lib/IR/Instructions.cpp#L3802-L3805 https://github.com/llvm/llvm-project/pull/76587 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits