@@ -130,8 +130,7 @@ struct DeferredValue_match {
130130
131131 explicit DeferredValue_match (SDValue &Match) : MatchVal(Match) {}
132132
133- template <typename MatchContext>
134- bool match (const MatchContext &, SDValue N) {
133+ template <typename MatchContext> bool match (const MatchContext &, SDValue N) {
135134 return N == MatchVal;
136135 }
137136};
@@ -580,40 +579,13 @@ m_InsertSubvector(const LHS &Base, const RHS &Sub, const IDX &Idx) {
580579}
581580
582581template <typename LTy, typename RTy, typename TTy, typename FTy, typename CCTy>
583- struct SelectCC_match {
584- LTy L;
585- RTy R;
586- TTy T;
587- FTy F;
588- CCTy CC;
589-
590- SelectCC_match (LTy L, RTy R, TTy T, FTy F, CCTy CC)
591- : L(std::move(L)), R(std::move(R)), T(std::move(T)), F(std::move(F)),
592- CC (std::move(CC)) {}
593-
594- template <typename MatchContext>
595- bool match (MatchContext &Ctx, SDValue V) {
596- return V.getOpcode () == ISD::SELECT_CC && L.match (Ctx, V.getOperand (0 )) &&
597- R.match (Ctx, V.getOperand (1 )) && T.match (Ctx, V.getOperand (2 )) &&
598- F.match (Ctx, V.getOperand (3 )) && CC.match (Ctx, V.getOperand (4 ));
599- }
600- };
601-
602- template <typename LTy, typename RTy, typename TTy, typename FTy, typename CCTy>
603- inline auto m_SelectCC (LTy &&L, RTy &&R, TTy &&T, FTy &&F, CCTy &&CC) {
604- return SelectCC_match<std::decay_t <LTy>, std::decay_t <RTy>, std::decay_t <TTy>,
605- std::decay_t <FTy>, std::decay_t <CCTy>>(
606- std::forward<LTy>(L), std::forward<RTy>(R), std::forward<TTy>(T),
607- std::forward<FTy>(F), std::forward<CCTy>(CC));
582+ inline auto m_SelectCC (LTy L, RTy R, TTy T, FTy F, CCTy CC) {
583+ return m_Node (ISD::SELECT_CC, L, R, T, F, CC);
608584}
609585
610586template <typename LTy, typename RTy, typename TTy, typename FTy, typename CCTy>
611- inline auto m_SelectCCLike (LTy &&L, RTy &&R, TTy &&T, FTy &&F, CCTy &&CC) {
612- return SDPatternMatch::m_AnyOf (
613- SDPatternMatch::m_Select (SDPatternMatch::m_SetCC (L, R, CC), T, F),
614- m_SelectCC (std::forward<LTy>(L), std::forward<RTy>(R),
615- std::forward<TTy>(T), std::forward<FTy>(F),
616- std::forward<CCTy>(CC)));
587+ inline auto m_SelectCCLike (LTy L, RTy R, TTy T, FTy F, CCTy CC) {
588+ return m_AnyOf (m_Select (m_SetCC (L, R, CC), T, F), m_SelectCC (L, R, T, F, CC));
617589}
618590
619591// === Binary operations ===
0 commit comments