@@ -630,14 +630,12 @@ RecurrenceDescriptor::isAnyOfPattern(Loop *Loop, PHINode *OrigPhi,
630630 Instruction *I, InstDesc &Prev) {
631631 // We must handle the select(cmp(),x,y) as a single instruction. Advance to
632632 // the select.
633- CmpPredicate Pred;
634- if (match (I, m_OneUse (m_Cmp (Pred, m_Value (), m_Value ())))) {
633+ if (match (I, m_OneUse (m_Cmp ()))) {
635634 if (auto *Select = dyn_cast<SelectInst>(*I->user_begin ()))
636635 return InstDesc (Select, Prev.getRecKind ());
637636 }
638637
639- if (!match (I,
640- m_Select (m_Cmp (Pred, m_Value (), m_Value ()), m_Value (), m_Value ())))
638+ if (!match (I, m_Select (m_Cmp (), m_Value (), m_Value ())))
641639 return InstDesc (false , I);
642640
643641 SelectInst *SI = cast<SelectInst>(I);
@@ -759,16 +757,14 @@ RecurrenceDescriptor::isMinMaxPattern(Instruction *I, RecurKind Kind,
759757
760758 // We must handle the select(cmp()) as a single instruction. Advance to the
761759 // select.
762- CmpPredicate Pred;
763- if (match (I, m_OneUse (m_Cmp (Pred, m_Value (), m_Value ())))) {
760+ if (match (I, m_OneUse (m_Cmp ()))) {
764761 if (auto *Select = dyn_cast<SelectInst>(*I->user_begin ()))
765762 return InstDesc (Select, Prev.getRecKind ());
766763 }
767764
768765 // Only match select with single use cmp condition, or a min/max intrinsic.
769766 if (!isa<IntrinsicInst>(I) &&
770- !match (I, m_Select (m_OneUse (m_Cmp (Pred, m_Value (), m_Value ())), m_Value (),
771- m_Value ())))
767+ !match (I, m_Select (m_OneUse (m_Cmp ()), m_Value (), m_Value ())))
772768 return InstDesc (false , I);
773769
774770 // Look for a min/max pattern.
0 commit comments