From ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 29 Mar 2005 06:37:47 +0000 Subject: disable this transformation in the one obscure case that really pessimizes pointer analysis. llvm-svn: 20916 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index e944672d262..40088ba06be 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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)) { -- cgit v1.2.3