From dd65d863a9c088e4d9048bd309d6bc0242233abd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 30 Apr 2003 22:34:06 +0000 Subject: Fix another case where constexprs could cause a crash llvm-svn: 5972 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Scalar') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index ad4ef420e9d..d00cefd37d4 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -197,11 +197,8 @@ static inline Value *dyn_castNotVal(Value *V) { return BinaryOperator::getNotArgument(cast(V)); // Constants can be considered to be not'ed values... - if (ConstantIntegral *C = dyn_cast(V)) { - Constant *NC = *ConstantIntegral::getAllOnesValue(C->getType()) ^ *C; - assert(NC && "Couldn't constant fold an exclusive or!"); - return NC; - } + if (ConstantIntegral *C = dyn_cast(V)) + return *ConstantIntegral::getAllOnesValue(C->getType()) ^ *C; return 0; } -- cgit v1.2.3