mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
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:
parent
d5e4e1756f
commit
2a0cd9c9b5
@ -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
Block a user