From b1515fe52270506faf1cff3184606cf76ace892b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 29 Mar 2005 06:37:47 +0000 Subject: [PATCH] disable this transformation in the one obscure case that really pessimizes pointer analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20916 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index e944672d262..40088ba06be 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4646,6 +4646,9 @@ static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI) { } if ((SrcPTy->isInteger() || isa(SrcPTy)) && + // Do not allow turning this into a load of an integer, which is then + // casted to a pointer, this pessimizes pointer analysis a lot. + (isa(SrcPTy) == isa(LI.getType())) && IC.getTargetData().getTypeSize(SrcPTy) == IC.getTargetData().getTypeSize(DestPTy)) {