================ @@ -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 ---------------- arsenm wrote:
I guess leave this as it was. The addrspacecast helpers are a mess, we should clear out the vestiges of opaque pointers. The cast build helpers should accept same same address space and elide the cast, like the other cases. Any changes there should be a separate change 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