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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18670 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-12-08 22:20:34 +00:00
parent d5e4e1756f
commit 2a0cd9c9b5

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