diff options
author | Philip Reames <listmail@philipreames.com> | 2021-04-20 11:47:10 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-04-20 11:47:10 -0700 |
commit | 3b6acb179708ea2f3caf95ace0f134fcbc460333 (patch) | |
tree | 5a956cbaba245a51440e09ef8280972054818532 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 9c1a145aeb1b3ea3f78d837fa680d9a35bae28ee (diff) | |
download | llvm-3b6acb179708ea2f3caf95ace0f134fcbc460333.zip llvm-3b6acb179708ea2f3caf95ace0f134fcbc460333.tar.gz llvm-3b6acb179708ea2f3caf95ace0f134fcbc460333.tar.bz2 |
Revert "Look through invertible recurrences in isKnownNonEqual"
This reverts commit be20eae25f50f5ef648aeefa1143e1c31e4410fc. It appears to have caused a crash on a buildbot (https://lab.llvm.org/buildbot#builders/77/builds/5653). Reverting while investigating.
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 8dbf1f7..46aa84f 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -2580,35 +2580,6 @@ static Optional<unsigned> getInvertibleOperand(const Operator *Op1, if (Op1->getOperand(0)->getType() == Op2->getOperand(0)->getType()) return 0; break; - case Instruction::PHI: { - const PHINode *PN1 = cast<PHINode>(Op1); - const PHINode *PN2 = cast<PHINode>(Op2); - - // If PN1 and PN2 are both recurrences, can we prove the entire recurrences - // are a single invertible function of the start values? Note that repeated - // application of an invertible function is also invertible - BinaryOperator *BO1 = nullptr; - Value *Start1 = nullptr, *Step1 = nullptr; - BinaryOperator *BO2 = nullptr; - Value *Start2 = nullptr, *Step2 = nullptr; - if (PN1->getParent() != PN2->getParent() || - !matchSimpleRecurrence(PN1, BO1, Start1, Step1) || - !matchSimpleRecurrence(PN2, BO2, Start2, Step2)) - break; - - Optional<unsigned> Idx = getInvertibleOperand(cast<Operator>(BO1), - cast<Operator>(BO2)); - if (!Idx || *Idx != 0) - break; - assert(BO1->getOperand(*Idx) == PN1 && BO2->getOperand(*Idx) == PN2); - - if (PN1->getOperand(0) == BO1) { - assert(PN2->getOperand(0) == BO2); - return 1; - } - assert(PN1->getOperand(1) == BO1 && PN2->getOperand(1) == BO2); - return 0; - } } return None; } |