diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-29 06:37:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-29 06:37:47 +0000 |
commit | ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc (patch) | |
tree | 66a278175c459e6492039073cb462056f5e25165 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 2c95fac9182f60a449d9010a265d2dc2790333cd (diff) | |
download | bcm5719-llvm-ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc.tar.gz bcm5719-llvm-ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc.zip |
disable this transformation in the one obscure case that really pessimizes
pointer analysis.
llvm-svn: 20916
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<PointerType>(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<PointerType>(SrcPTy) == isa<PointerType>(LI.getType())) && IC.getTargetData().getTypeSize(SrcPTy) == IC.getTargetData().getTypeSize(DestPTy)) { |