diff options
author | Thomas Lively <tlively@google.com> | 2018-10-19 19:01:26 +0000 |
---|---|---|
committer | Thomas Lively <tlively@google.com> | 2018-10-19 19:01:26 +0000 |
commit | c339250e122a3d5e6148f994d7f69eae95c31aa6 (patch) | |
tree | b8883babc81ed815b7dad1f976a198aeb0f3b47f /llvm/lib/Analysis/ValueTracking.cpp | |
parent | c3d447fe26f9bf742625f70feadd102c1eed0d99 (diff) | |
download | llvm-c339250e122a3d5e6148f994d7f69eae95c31aa6.zip llvm-c339250e122a3d5e6148f994d7f69eae95c31aa6.tar.gz llvm-c339250e122a3d5e6148f994d7f69eae95c31aa6.tar.bz2 |
[InstCombine] InstCombine and InstSimplify for minimum and maximum
Summary: Depends on D52765
Reviewers: aheejin, dschuff
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52766
llvm-svn: 344799
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 02d0717..b7ff81f 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2898,7 +2898,13 @@ static bool cannotBeOrderedLessThanZeroImpl(const Value *V, cannotBeOrderedLessThanZeroImpl(I->getOperand(1), TLI, SignBitOnly, Depth + 1)); + case Intrinsic::maximum: + return cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, SignBitOnly, + Depth + 1) || + cannotBeOrderedLessThanZeroImpl(I->getOperand(1), TLI, SignBitOnly, + Depth + 1); case Intrinsic::minnum: + case Intrinsic::minimum: return cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, SignBitOnly, Depth + 1) && cannotBeOrderedLessThanZeroImpl(I->getOperand(1), TLI, SignBitOnly, |