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:
fe32e0c
)
Fix another case where constexprs could cause a crash
author
Chris Lattner
<sabre@nondot.org>
Wed, 30 Apr 2003 22:34:06 +0000
(22:34 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 30 Apr 2003 22:34:06 +0000
(22:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5972
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 ad4ef420e9db938df52e3a3afac759a62b131353..d00cefd37d4ecc744c83a68c6de7ec5905682659 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-197,11
+197,8
@@
static inline Value *dyn_castNotVal(Value *V) {
return BinaryOperator::getNotArgument(cast<BinaryOperator>(V));
// Constants can be considered to be not'ed values...
- if (ConstantIntegral *C = dyn_cast<ConstantIntegral>(V)) {
- Constant *NC = *ConstantIntegral::getAllOnesValue(C->getType()) ^ *C;
- assert(NC && "Couldn't constant fold an exclusive or!");
- return NC;
- }
+ if (ConstantIntegral *C = dyn_cast<ConstantIntegral>(V))
+ return *ConstantIntegral::getAllOnesValue(C->getType()) ^ *C;
return 0;
}