@@ -630,14 +630,12 @@ RecurrenceDescriptor::isAnyOfPattern(Loop *Loop, PHINode *OrigPhi,
630
630
Instruction *I, InstDesc &Prev) {
631
631
// We must handle the select(cmp(),x,y) as a single instruction. Advance to
632
632
// 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 ()))) {
635
634
if (auto *Select = dyn_cast<SelectInst>(*I->user_begin ()))
636
635
return InstDesc (Select, Prev.getRecKind ());
637
636
}
638
637
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 ())))
641
639
return InstDesc (false , I);
642
640
643
641
SelectInst *SI = cast<SelectInst>(I);
@@ -759,16 +757,14 @@ RecurrenceDescriptor::isMinMaxPattern(Instruction *I, RecurKind Kind,
759
757
760
758
// We must handle the select(cmp()) as a single instruction. Advance to the
761
759
// 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 ()))) {
764
761
if (auto *Select = dyn_cast<SelectInst>(*I->user_begin ()))
765
762
return InstDesc (Select, Prev.getRecKind ());
766
763
}
767
764
768
765
// Only match select with single use cmp condition, or a min/max intrinsic.
769
766
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 ())))
772
768
return InstDesc (false , I);
773
769
774
770
// Look for a min/max pattern.
0 commit comments