Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll

llvm-svn: 18670
This commit is contained in:
Chris Lattner 2004-12-08 22:20:34 +00:00
parent ace35e9be6
commit 8f30caf549
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}