summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-29 06:37:47 +0000
committerChris Lattner <sabre@nondot.org>2005-03-29 06:37:47 +0000
commitecfa9b5810b5c8141a8afe89fb85c12631d9f3cc (patch)
tree66a278175c459e6492039073cb462056f5e25165
parent2c95fac9182f60a449d9010a265d2dc2790333cd (diff)
downloadbcm5719-llvm-ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc.tar.gz
bcm5719-llvm-ecfa9b5810b5c8141a8afe89fb85c12631d9f3cc.zip
disable this transformation in the one obscure case that really pessimizes
pointer analysis. llvm-svn: 20916
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
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)) {
OpenPOWER on IntegriCloud