projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5e4e17
)
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
author
Chris Lattner
<sabre@nondot.org>
Wed, 8 Dec 2004 22:20:34 +0000
(22:20 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 8 Dec 2004 22:20:34 +0000
(22:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18670
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 8915598da115137715daa87d47b151e8464f4056..9eb30549f47b58dbbc842bd19783e02cac478fc8 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
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;
}