diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 4d168ce..69dcd30 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -4368,6 +4368,8 @@ void OverflowTracking::mergeFlags(Instruction &I) { HasNUW &= I.hasNoUnsignedWrap(); HasNSW &= I.hasNoSignedWrap(); } + if (auto *DisjointOp = dyn_cast<PossiblyDisjointInst>(&I)) + IsDisjoint &= DisjointOp->isDisjoint(); } void OverflowTracking::applyFlags(Instruction &I) { @@ -4379,4 +4381,6 @@ void OverflowTracking::applyFlags(Instruction &I) { if (HasNSW && (AllKnownNonNegative || HasNUW)) I.setHasNoSignedWrap(); } + if (auto *DisjointOp = dyn_cast<PossiblyDisjointInst>(&I)) + DisjointOp->setIsDisjoint(IsDisjoint); } |