summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-08 22:20:34 +0000
committerChris Lattner <sabre@nondot.org>2004-12-08 22:20:34 +0000
commit8f30caf5494bf7225388cba1df7c221ae87dcb2d (patch)
tree37d17b66014e01fb090f59e403bc44f17c7204ce /llvm/lib
parentace35e9be6d247682c8e64972729614c4b689dbc (diff)
downloadbcm5719-llvm-8f30caf5494bf7225388cba1df7c221ae87dcb2d.tar.gz
bcm5719-llvm-8f30caf5494bf7225388cba1df7c221ae87dcb2d.zip
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
llvm-svn: 18670
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 8915598da11..9eb30549f47 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -309,7 +309,8 @@ static inline Value *dyn_castNegVal(Value *V) {
// Constants can be considered to be negated values if they can be folded...
if (Constant *C = dyn_cast<Constant>(V))
- return ConstantExpr::getNeg(C);
+ if (!isa<UndefValue>(C))
+ return ConstantExpr::getNeg(C);
return 0;
}
OpenPOWER on IntegriCloud