forked from OSchip/llvm-project
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
llvm-svn: 18670
This commit is contained in:
parent
ace35e9be6
commit
8f30caf549
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue