summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-15 19:57:43 +0000
committerChris Lattner <sabre@nondot.org>2009-11-15 19:57:43 +0000
commit5f037b6439856fa4a8414c00838cfbe5b794b560 (patch)
treebe973c6725e5755e7568e4b09fc24c63c6c169fa /llvm/lib/Transforms
parentfb7613a5d698822beb4e63860e87a07dd3701fc2 (diff)
downloadbcm5719-llvm-5f037b6439856fa4a8414c00838cfbe5b794b560.tar.gz
bcm5719-llvm-5f037b6439856fa4a8414c00838cfbe5b794b560.zip
fix a bug handling 'not x' when x is undef.
llvm-svn: 88864
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index d5ce86aca0c..de4c118b69d 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -350,8 +350,9 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,PredValueInfo &Result){
// Invert the known values.
for (unsigned i = 0, e = Result.size(); i != e; ++i)
- Result[i].first =
- cast<ConstantInt>(ConstantExpr::getNot(Result[i].first));
+ if (Result[i].first)
+ Result[i].first =
+ cast<ConstantInt>(ConstantExpr::getNot(Result[i].first));
return true;
}
}
OpenPOWER on IntegriCloud