From: Chris Lattner Date: Tue, 29 Mar 2005 06:37:47 +0000 (+0000) Subject: disable this transformation in the one obscure case that really pessimizes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b1515fe52270506faf1cff3184606cf76ace892b;p=oota-llvm.git 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 --- 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)) {