nikic added inline comments.
================ Comment at: clang/lib/CodeGen/CGNonTrivialStruct.cpp:370 llvm::Value *DstArrayEnd = CGF.Builder.CreateInBoundsGEP(CGF.Int8Ty, BC.getPointer(), SizeInBytes); DstArrayEnd = CGF.Builder.CreateBitCast( ---------------- Only `BC.getPointer()` is used, so you can omit the withElementType. ================ Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:3121-3123 + This = This.withElementType(CGM.Int8Ty); llvm::Value *VBPtr = Builder.CreateInBoundsGEP( This.getElementType(), This.getPointer(), VBPtrOffset, "vbptr"); ---------------- ================ Comment at: clang/lib/CodeGen/MicrosoftCXXABI.cpp:3126 VBPtr = Builder.CreateBitCast(VBPtr, CGM.Int32Ty->getPointerTo(0)->getPointerTo(This.getAddressSpace())); ---------------- Can drop this bitcast while here. ================ Comment at: clang/lib/CodeGen/Targets/AArch64.cpp:523 Address Addr = Address(Load, CGF.Int8Ty, SlotSize); - return CGF.Builder.CreateElementBitCast(Addr, CGF.ConvertTypeForMem(Ty)); + return Addr.withElementType(CGF.ConvertTypeForMem(Ty)); } ---------------- Can inline this withElementType call into Address ctor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153314/new/ https://reviews.llvm.org/D153314 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits