================ @@ -2799,9 +2799,30 @@ CodeGenFunction::EmitLoadOfReference(LValue RefLVal, llvm::LoadInst *Load = Builder.CreateLoad(RefLVal.getAddress(), RefLVal.isVolatile()); CGM.DecorateInstructionWithTBAA(Load, RefLVal.getTBAAInfo()); - return makeNaturalAddressForPointer(Load, RefLVal.getType()->getPointeeType(), - CharUnits(), /*ForPointeeType=*/true, - PointeeBaseInfo, PointeeTBAAInfo); + QualType PTy = RefLVal.getType()->getPointeeType(); + if (!PTy->isIncompleteType() && PTy->isConstantSizeType()) { ---------------- dtcxzyw wrote:
Removed. It was needed by `!dereferenceable`. https://github.com/llvm/llvm-project/pull/98746 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits