LLVM  14.0.0git
MIPatternMatch.h
Go to the documentation of this file.
1 //==------ llvm/CodeGen/GlobalISel/MIPatternMatch.h -------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 /// Contains matchers for matching SSA Machine Instructions.
10 ///
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CODEGEN_GLOBALISEL_MIPATTERNMATCH_H
14 #define LLVM_CODEGEN_GLOBALISEL_MIPATTERNMATCH_H
15 
16 #include "llvm/ADT/APInt.h"
19 #include "llvm/IR/InstrTypes.h"
20 
21 namespace llvm {
22 namespace MIPatternMatch {
23 
24 template <typename Reg, typename Pattern>
26  return P.match(MRI, R);
27 }
28 
29 template <typename Pattern>
31  return P.match(MRI, &MI);
32 }
33 
34 // TODO: Extend for N use.
35 template <typename SubPatternT> struct OneUse_match {
36  SubPatternT SubPat;
37  OneUse_match(const SubPatternT &SP) : SubPat(SP) {}
38 
40  return MRI.hasOneUse(Reg) && SubPat.match(MRI, Reg);
41  }
42 };
43 
44 template <typename SubPat>
45 inline OneUse_match<SubPat> m_OneUse(const SubPat &SP) {
46  return SP;
47 }
48 
49 template <typename SubPatternT> struct OneNonDBGUse_match {
50  SubPatternT SubPat;
51  OneNonDBGUse_match(const SubPatternT &SP) : SubPat(SP) {}
52 
54  return MRI.hasOneNonDBGUse(Reg) && SubPat.match(MRI, Reg);
55  }
56 };
57 
58 template <typename SubPat>
59 inline OneNonDBGUse_match<SubPat> m_OneNonDBGUse(const SubPat &SP) {
60  return SP;
61 }
62 
63 template <typename ConstT>
65 
66 template <>
68  const MachineRegisterInfo &MRI) {
69  return getIConstantVRegVal(Reg, MRI);
70 }
71 
72 template <>
74  const MachineRegisterInfo &MRI) {
76 }
77 
78 template <typename ConstT> struct ConstantMatch {
79  ConstT &CR;
80  ConstantMatch(ConstT &C) : CR(C) {}
82  if (auto MaybeCst = matchConstant<ConstT>(Reg, MRI)) {
83  CR = *MaybeCst;
84  return true;
85  }
86  return false;
87  }
88 };
89 
91  return ConstantMatch<APInt>(Cst);
92 }
93 inline ConstantMatch<int64_t> m_ICst(int64_t &Cst) {
94  return ConstantMatch<int64_t>(Cst);
95 }
96 
102  return ValReg ? true : false;
103  }
104 };
105 
107  return GCstAndRegMatch(ValReg);
108 }
109 
115  return FPValReg ? true : false;
116  }
117 };
118 
120  return GFCstAndRegMatch(FPValReg);
121 }
122 
126  : FPValReg(FPValReg) {}
128  return (FPValReg = getFConstantSplat(Reg, MRI)) ||
130  };
131 };
132 
133 inline GFCstOrSplatGFCstMatch
135  return GFCstOrSplatGFCstMatch(FPValReg);
136 }
137 
138 /// Matcher for a specific constant value.
140  int64_t RequestedVal;
143  int64_t MatchedVal;
144  return mi_match(Reg, MRI, m_ICst(MatchedVal)) && MatchedVal == RequestedVal;
145  }
146 };
147 
148 /// Matches a constant equal to \p RequestedValue.
149 inline SpecificConstantMatch m_SpecificICst(int64_t RequestedValue) {
150  return SpecificConstantMatch(RequestedValue);
151 }
152 
153 /// Matcher for a specific constant splat.
155  int64_t RequestedVal;
160  /* AllowUndef */ false);
161  }
162 };
163 
164 /// Matches a constant splat of \p RequestedValue.
165 inline SpecificConstantSplatMatch m_SpecificICstSplat(int64_t RequestedValue) {
166  return SpecificConstantSplatMatch(RequestedValue);
167 }
168 
169 /// Matcher for a specific constant or constant splat.
171  int64_t RequestedVal;
175  int64_t MatchedVal;
176  if (mi_match(Reg, MRI, m_ICst(MatchedVal)) && MatchedVal == RequestedVal)
177  return true;
179  /* AllowUndef */ false);
180  }
181 };
182 
183 /// Matches a \p RequestedValue constant or a constant splat of \p
184 /// RequestedValue.
185 inline SpecificConstantOrSplatMatch
186 m_SpecificICstOrSplat(int64_t RequestedValue) {
187  return SpecificConstantOrSplatMatch(RequestedValue);
188 }
189 
190 ///{
191 /// Convenience matchers for specific integer values.
194  return SpecificConstantMatch(-1);
195 }
196 ///}
197 
198 // TODO: Rework this for different kinds of MachineOperand.
199 // Currently assumes the Src for a match is a register.
200 // We might want to support taking in some MachineOperands and call getReg on
201 // that.
202 
204  bool match(const MachineRegisterInfo &MRI, Register Reg) { return true; }
206  return MO->isReg();
207  }
208 };
209 
211 
212 /// Matching combinators.
213 template <typename... Preds> struct And {
214  template <typename MatchSrc>
215  bool match(const MachineRegisterInfo &MRI, MatchSrc &&src) {
216  return true;
217  }
218 };
219 
220 template <typename Pred, typename... Preds>
221 struct And<Pred, Preds...> : And<Preds...> {
222  Pred P;
223  And(Pred &&p, Preds &&... preds)
224  : And<Preds...>(std::forward<Preds>(preds)...), P(std::forward<Pred>(p)) {
225  }
226  template <typename MatchSrc>
227  bool match(const MachineRegisterInfo &MRI, MatchSrc &&src) {
228  return P.match(MRI, src) && And<Preds...>::match(MRI, src);
229  }
230 };
231 
232 template <typename... Preds> struct Or {
233  template <typename MatchSrc>
234  bool match(const MachineRegisterInfo &MRI, MatchSrc &&src) {
235  return false;
236  }
237 };
238 
239 template <typename Pred, typename... Preds>
240 struct Or<Pred, Preds...> : Or<Preds...> {
241  Pred P;
242  Or(Pred &&p, Preds &&... preds)
243  : Or<Preds...>(std::forward<Preds>(preds)...), P(std::forward<Pred>(p)) {}
244  template <typename MatchSrc>
245  bool match(const MachineRegisterInfo &MRI, MatchSrc &&src) {
246  return P.match(MRI, src) || Or<Preds...>::match(MRI, src);
247  }
248 };
249 
250 template <typename... Preds> And<Preds...> m_all_of(Preds &&... preds) {
251  return And<Preds...>(std::forward<Preds>(preds)...);
252 }
253 
254 template <typename... Preds> Or<Preds...> m_any_of(Preds &&... preds) {
255  return Or<Preds...>(std::forward<Preds>(preds)...);
256 }
257 
258 template <typename BindTy> struct bind_helper {
259  static bool bind(const MachineRegisterInfo &MRI, BindTy &VR, BindTy &V) {
260  VR = V;
261  return true;
262  }
263 };
264 
265 template <> struct bind_helper<MachineInstr *> {
266  static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI,
267  Register Reg) {
268  MI = MRI.getVRegDef(Reg);
269  if (MI)
270  return true;
271  return false;
272  }
273  static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI,
274  MachineInstr *Inst) {
275  MI = Inst;
276  return MI;
277  }
278 };
279 
280 template <> struct bind_helper<LLT> {
281  static bool bind(const MachineRegisterInfo &MRI, LLT Ty, Register Reg) {
282  Ty = MRI.getType(Reg);
283  if (Ty.isValid())
284  return true;
285  return false;
286  }
287 };
288 
289 template <> struct bind_helper<const ConstantFP *> {
290  static bool bind(const MachineRegisterInfo &MRI, const ConstantFP *&F,
291  Register Reg) {
293  if (F)
294  return true;
295  return false;
296  }
297 };
298 
299 template <typename Class> struct bind_ty {
300  Class &VR;
301 
302  bind_ty(Class &V) : VR(V) {}
303 
304  template <typename ITy> bool match(const MachineRegisterInfo &MRI, ITy &&V) {
305  return bind_helper<Class>::bind(MRI, VR, V);
306  }
307 };
308 
309 inline bind_ty<Register> m_Reg(Register &R) { return R; }
311 inline bind_ty<LLT> m_Type(LLT Ty) { return Ty; }
314 
315 // Helper for matching G_FCONSTANT
316 inline bind_ty<const ConstantFP *> m_GFCst(const ConstantFP *&C) { return C; }
317 
318 // General helper for all the binary generic MI such as G_ADD/G_SUB etc
319 template <typename LHS_P, typename RHS_P, unsigned Opcode,
320  bool Commutable = false>
322  LHS_P L;
323  RHS_P R;
324 
325  BinaryOp_match(const LHS_P &LHS, const RHS_P &RHS) : L(LHS), R(RHS) {}
326  template <typename OpTy>
327  bool match(const MachineRegisterInfo &MRI, OpTy &&Op) {
328  MachineInstr *TmpMI;
329  if (mi_match(Op, MRI, m_MInstr(TmpMI))) {
330  if (TmpMI->getOpcode() == Opcode && TmpMI->getNumOperands() == 3) {
331  return (L.match(MRI, TmpMI->getOperand(1).getReg()) &&
332  R.match(MRI, TmpMI->getOperand(2).getReg())) ||
333  (Commutable && (R.match(MRI, TmpMI->getOperand(1).getReg()) &&
334  L.match(MRI, TmpMI->getOperand(2).getReg())));
335  }
336  }
337  return false;
338  }
339 };
340 
341 // Helper for (commutative) binary generic MI that checks Opcode.
342 template <typename LHS_P, typename RHS_P, bool Commutable = false>
344  unsigned Opc;
345  LHS_P L;
346  RHS_P R;
347 
348  BinaryOpc_match(unsigned Opcode, const LHS_P &LHS, const RHS_P &RHS)
349  : Opc(Opcode), L(LHS), R(RHS) {}
350  template <typename OpTy>
351  bool match(const MachineRegisterInfo &MRI, OpTy &&Op) {
352  MachineInstr *TmpMI;
353  if (mi_match(Op, MRI, m_MInstr(TmpMI))) {
354  if (TmpMI->getOpcode() == Opc && TmpMI->getNumDefs() == 1 &&
355  TmpMI->getNumOperands() == 3) {
356  return (L.match(MRI, TmpMI->getOperand(1).getReg()) &&
357  R.match(MRI, TmpMI->getOperand(2).getReg())) ||
358  (Commutable && (R.match(MRI, TmpMI->getOperand(1).getReg()) &&
359  L.match(MRI, TmpMI->getOperand(2).getReg())));
360  }
361  }
362  return false;
363  }
364 };
365 
366 template <typename LHS, typename RHS>
367 inline BinaryOpc_match<LHS, RHS, false> m_BinOp(unsigned Opcode, const LHS &L,
368  const RHS &R) {
369  return BinaryOpc_match<LHS, RHS, false>(Opcode, L, R);
370 }
371 
372 template <typename LHS, typename RHS>
373 inline BinaryOpc_match<LHS, RHS, true>
374 m_CommutativeBinOp(unsigned Opcode, const LHS &L, const RHS &R) {
375  return BinaryOpc_match<LHS, RHS, true>(Opcode, L, R);
376 }
377 
378 template <typename LHS, typename RHS>
380 m_GAdd(const LHS &L, const RHS &R) {
382 }
383 
384 template <typename LHS, typename RHS>
386 m_GPtrAdd(const LHS &L, const RHS &R) {
388 }
389 
390 template <typename LHS, typename RHS>
392  const RHS &R) {
394 }
395 
396 template <typename LHS, typename RHS>
398 m_GMul(const LHS &L, const RHS &R) {
400 }
401 
402 template <typename LHS, typename RHS>
404 m_GFAdd(const LHS &L, const RHS &R) {
406 }
407 
408 template <typename LHS, typename RHS>
410 m_GFMul(const LHS &L, const RHS &R) {
412 }
413 
414 template <typename LHS, typename RHS>
416 m_GFSub(const LHS &L, const RHS &R) {
418 }
419 
420 template <typename LHS, typename RHS>
422 m_GAnd(const LHS &L, const RHS &R) {
424 }
425 
426 template <typename LHS, typename RHS>
428 m_GXor(const LHS &L, const RHS &R) {
430 }
431 
432 template <typename LHS, typename RHS>
434  const RHS &R) {
436 }
437 
438 template <typename LHS, typename RHS>
440 m_GShl(const LHS &L, const RHS &R) {
442 }
443 
444 template <typename LHS, typename RHS>
446 m_GLShr(const LHS &L, const RHS &R) {
448 }
449 
450 template <typename LHS, typename RHS>
452 m_GAShr(const LHS &L, const RHS &R) {
454 }
455 
456 template <typename LHS, typename RHS>
458 m_GSMax(const LHS &L, const RHS &R) {
460 }
461 
462 template <typename LHS, typename RHS>
464 m_GSMin(const LHS &L, const RHS &R) {
466 }
467 
468 // Helper for unary instructions (G_[ZSA]EXT/G_TRUNC) etc
469 template <typename SrcTy, unsigned Opcode> struct UnaryOp_match {
470  SrcTy L;
471 
472  UnaryOp_match(const SrcTy &LHS) : L(LHS) {}
473  template <typename OpTy>
474  bool match(const MachineRegisterInfo &MRI, OpTy &&Op) {
475  MachineInstr *TmpMI;
476  if (mi_match(Op, MRI, m_MInstr(TmpMI))) {
477  if (TmpMI->getOpcode() == Opcode && TmpMI->getNumOperands() == 2) {
478  return L.match(MRI, TmpMI->getOperand(1).getReg());
479  }
480  }
481  return false;
482  }
483 };
484 
485 template <typename SrcTy>
486 inline UnaryOp_match<SrcTy, TargetOpcode::G_ANYEXT>
487 m_GAnyExt(const SrcTy &Src) {
489 }
490 
491 template <typename SrcTy>
494 }
495 
496 template <typename SrcTy>
499 }
500 
501 template <typename SrcTy>
504 }
505 
506 template <typename SrcTy>
509 }
510 
511 template <typename SrcTy>
512 inline UnaryOp_match<SrcTy, TargetOpcode::G_BITCAST>
513 m_GBitcast(const SrcTy &Src) {
515 }
516 
517 template <typename SrcTy>
518 inline UnaryOp_match<SrcTy, TargetOpcode::G_PTRTOINT>
519 m_GPtrToInt(const SrcTy &Src) {
521 }
522 
523 template <typename SrcTy>
524 inline UnaryOp_match<SrcTy, TargetOpcode::G_INTTOPTR>
525 m_GIntToPtr(const SrcTy &Src) {
527 }
528 
529 template <typename SrcTy>
530 inline UnaryOp_match<SrcTy, TargetOpcode::G_FPTRUNC>
531 m_GFPTrunc(const SrcTy &Src) {
533 }
534 
535 template <typename SrcTy>
538 }
539 
540 template <typename SrcTy>
543 }
544 
545 template <typename SrcTy>
547  return UnaryOp_match<SrcTy, TargetOpcode::COPY>(std::forward<SrcTy>(Src));
548 }
549 
550 template <typename SrcTy>
553 }
554 
555 // General helper for generic MI compares, i.e. G_ICMP and G_FCMP
556 // TODO: Allow checking a specific predicate.
557 template <typename Pred_P, typename LHS_P, typename RHS_P, unsigned Opcode>
559  Pred_P P;
560  LHS_P L;
561  RHS_P R;
562 
563  CompareOp_match(const Pred_P &Pred, const LHS_P &LHS, const RHS_P &RHS)
564  : P(Pred), L(LHS), R(RHS) {}
565 
566  template <typename OpTy>
567  bool match(const MachineRegisterInfo &MRI, OpTy &&Op) {
568  MachineInstr *TmpMI;
569  if (!mi_match(Op, MRI, m_MInstr(TmpMI)) || TmpMI->getOpcode() != Opcode)
570  return false;
571 
572  auto TmpPred =
573  static_cast<CmpInst::Predicate>(TmpMI->getOperand(1).getPredicate());
574  if (!P.match(MRI, TmpPred))
575  return false;
576 
577  return L.match(MRI, TmpMI->getOperand(2).getReg()) &&
578  R.match(MRI, TmpMI->getOperand(3).getReg());
579  }
580 };
581 
582 template <typename Pred, typename LHS, typename RHS>
583 inline CompareOp_match<Pred, LHS, RHS, TargetOpcode::G_ICMP>
584 m_GICmp(const Pred &P, const LHS &L, const RHS &R) {
586 }
587 
588 template <typename Pred, typename LHS, typename RHS>
589 inline CompareOp_match<Pred, LHS, RHS, TargetOpcode::G_FCMP>
590 m_GFCmp(const Pred &P, const LHS &L, const RHS &R) {
592 }
593 
594 // Helper for checking if a Reg is of specific type.
595 struct CheckType {
597  CheckType(const LLT Ty) : Ty(Ty) {}
598 
600  return MRI.getType(Reg) == Ty;
601  }
602 };
603 
604 inline CheckType m_SpecificType(LLT Ty) { return Ty; }
605 
606 template <typename Src0Ty, typename Src1Ty, typename Src2Ty, unsigned Opcode>
608  Src0Ty Src0;
609  Src1Ty Src1;
610  Src2Ty Src2;
611 
612  TernaryOp_match(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
613  : Src0(Src0), Src1(Src1), Src2(Src2) {}
614  template <typename OpTy>
615  bool match(const MachineRegisterInfo &MRI, OpTy &&Op) {
616  MachineInstr *TmpMI;
617  if (mi_match(Op, MRI, m_MInstr(TmpMI))) {
618  if (TmpMI->getOpcode() == Opcode && TmpMI->getNumOperands() == 4) {
619  return (Src0.match(MRI, TmpMI->getOperand(1).getReg()) &&
620  Src1.match(MRI, TmpMI->getOperand(2).getReg()) &&
621  Src2.match(MRI, TmpMI->getOperand(3).getReg()));
622  }
623  }
624  return false;
625  }
626 };
627 template <typename Src0Ty, typename Src1Ty, typename Src2Ty>
628 inline TernaryOp_match<Src0Ty, Src1Ty, Src2Ty,
629  TargetOpcode::G_INSERT_VECTOR_ELT>
630 m_GInsertVecElt(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2) {
631  return TernaryOp_match<Src0Ty, Src1Ty, Src2Ty,
632  TargetOpcode::G_INSERT_VECTOR_ELT>(Src0, Src1, Src2);
633 }
634 
635 template <typename Src0Ty, typename Src1Ty, typename Src2Ty>
636 inline TernaryOp_match<Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_SELECT>
637 m_GISelect(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2) {
639  Src0, Src1, Src2);
640 }
641 
642 /// Matches a register negated by a G_SUB.
643 /// G_SUB 0, %negated_reg
644 template <typename SrcTy>
646 m_Neg(const SrcTy &&Src) {
647  return m_GSub(m_ZeroInt(), Src);
648 }
649 
650 /// Matches a register not-ed by a G_XOR.
651 /// G_XOR %not_reg, -1
652 template <typename SrcTy>
654 m_Not(const SrcTy &&Src) {
655  return m_GXor(Src, m_AllOnesInt());
656 }
657 
658 } // namespace MIPatternMatch
659 } // namespace llvm
660 
661 #endif
llvm::MIPatternMatch::CheckType
Definition: MIPatternMatch.h:595
llvm::getIConstantVRegSExtVal
Optional< int64_t > getIConstantVRegSExtVal(Register VReg, const MachineRegisterInfo &MRI)
If VReg is defined by a G_CONSTANT fits in int64_t returns it.
Definition: Utils.cpp:292
llvm::MIPatternMatch::operand_type_match::match
bool match(const MachineRegisterInfo &MRI, MachineOperand *MO)
Definition: MIPatternMatch.h:205
llvm::MIPatternMatch::TernaryOp_match::match
bool match(const MachineRegisterInfo &MRI, OpTy &&Op)
Definition: MIPatternMatch.h:615
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1563
llvm::PatternMatch::BinaryOp_match
Definition: PatternMatch.h:961
llvm::MIPatternMatch::bind_helper< LLT >::bind
static bool bind(const MachineRegisterInfo &MRI, LLT Ty, Register Reg)
Definition: MIPatternMatch.h:281
llvm::MIPatternMatch::m_SpecificICstSplat
SpecificConstantSplatMatch m_SpecificICstSplat(int64_t RequestedValue)
Matches a constant splat of RequestedValue.
Definition: MIPatternMatch.h:165
llvm::MIPatternMatch::UnaryOp_match::UnaryOp_match
UnaryOp_match(const SrcTy &LHS)
Definition: MIPatternMatch.h:472
llvm::MIPatternMatch::GFCstAndRegMatch::FPValReg
Optional< FPValueAndVReg > & FPValReg
Definition: MIPatternMatch.h:111
llvm::CmpInst::Predicate
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Definition: InstrTypes.h:721
llvm::MIPatternMatch::m_GFPExt
UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > m_GFPExt(const SrcTy &Src)
Definition: MIPatternMatch.h:502
llvm::MIPatternMatch::m_GFNeg
UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > m_GFNeg(const SrcTy &Src)
Definition: MIPatternMatch.h:541
llvm::MIPatternMatch::m_Reg
operand_type_match m_Reg()
Definition: MIPatternMatch.h:210
llvm::MIPatternMatch::m_GAnd
BinaryOp_match< LHS, RHS, TargetOpcode::G_AND, true > m_GAnd(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:422
llvm::MIPatternMatch::m_GShl
BinaryOp_match< LHS, RHS, TargetOpcode::G_SHL, false > m_GShl(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:440
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition: MachineRegisterInfo.h:52
llvm::MIPatternMatch::SpecificConstantSplatMatch::RequestedVal
int64_t RequestedVal
Definition: MIPatternMatch.h:155
llvm::MIPatternMatch::Or< Pred, Preds... >::P
Pred P
Definition: MIPatternMatch.h:241
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::MIPatternMatch::m_GLShr
BinaryOp_match< LHS, RHS, TargetOpcode::G_LSHR, false > m_GLShr(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:446
llvm::MIPatternMatch::BinaryOpc_match::Opc
unsigned Opc
Definition: MIPatternMatch.h:344
llvm::MIPatternMatch::UnaryOp_match::L
SrcTy L
Definition: MIPatternMatch.h:470
llvm::MCID::Commutable
@ Commutable
Definition: MCInstrDesc.h:171
llvm::MIPatternMatch::m_OneNonDBGUse
OneNonDBGUse_match< SubPat > m_OneNonDBGUse(const SubPat &SP)
Definition: MIPatternMatch.h:59
llvm::MIPatternMatch::GCstAndRegMatch::GCstAndRegMatch
GCstAndRegMatch(Optional< ValueAndVReg > &ValReg)
Definition: MIPatternMatch.h:99
llvm::MIPatternMatch::m_GSub
BinaryOp_match< LHS, RHS, TargetOpcode::G_SUB > m_GSub(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:391
llvm::MIPatternMatch::BinaryOpc_match::L
LHS_P L
Definition: MIPatternMatch.h:345
llvm::MIPatternMatch::m_GTrunc
UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > m_GTrunc(const SrcTy &Src)
Definition: MIPatternMatch.h:507
APInt.h
llvm::MIPatternMatch::BinaryOpc_match::R
RHS_P R
Definition: MIPatternMatch.h:346
llvm::MIPatternMatch::m_GFSub
BinaryOp_match< LHS, RHS, TargetOpcode::G_FSUB, false > m_GFSub(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:416
true
basic Basic Alias true
Definition: BasicAliasAnalysis.cpp:1886
llvm::MIPatternMatch::m_GSMax
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMAX, false > m_GSMax(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:458
llvm::MIPatternMatch::CheckType::CheckType
CheckType(const LLT Ty)
Definition: MIPatternMatch.h:597
llvm::MIPatternMatch::m_GICmp
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP > m_GICmp(const Pred &P, const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:584
llvm::LLT::isValid
bool isValid() const
Definition: LowLevelTypeImpl.h:116
llvm::MIPatternMatch::m_GFAdd
BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, true > m_GFAdd(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:404
llvm::Optional
Definition: APInt.h:33
llvm::MIPatternMatch::BinaryOpc_match::match
bool match(const MachineRegisterInfo &MRI, OpTy &&Op)
Definition: MIPatternMatch.h:351
llvm::MIPatternMatch::m_GSMin
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMIN, false > m_GSMin(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:464
llvm::MIPatternMatch::bind_ty::match
bool match(const MachineRegisterInfo &MRI, ITy &&V)
Definition: MIPatternMatch.h:304
RHS
Value * RHS
Definition: X86PartialReduction.cpp:74
llvm::MIPatternMatch::SpecificConstantMatch::RequestedVal
int64_t RequestedVal
Definition: MIPatternMatch.h:140
llvm::MIPatternMatch::SpecificConstantOrSplatMatch::RequestedVal
int64_t RequestedVal
Definition: MIPatternMatch.h:171
preds
preds
Definition: README.txt:340
p
the resulting code requires compare and branches when and if * p
Definition: README.txt:396
llvm::MIPatternMatch::BinaryOpc_match::BinaryOpc_match
BinaryOpc_match(unsigned Opcode, const LHS_P &LHS, const RHS_P &RHS)
Definition: MIPatternMatch.h:348
llvm::MIPatternMatch::m_GPtrAdd
BinaryOp_match< LHS, RHS, TargetOpcode::G_PTR_ADD, false > m_GPtrAdd(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:386
llvm::MIPatternMatch::BinaryOp_match::R
RHS_P R
Definition: MIPatternMatch.h:323
llvm::MIPatternMatch::BinaryOp_match::L
LHS_P L
Definition: MIPatternMatch.h:322
llvm::MIPatternMatch::m_GPtrToInt
UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > m_GPtrToInt(const SrcTy &Src)
Definition: MIPatternMatch.h:519
llvm::MIPatternMatch::m_GFabs
UnaryOp_match< SrcTy, TargetOpcode::G_FABS > m_GFabs(const SrcTy &Src)
Definition: MIPatternMatch.h:536
F
#define F(x, y, z)
Definition: MD5.cpp:55
MachineRegisterInfo.h
llvm::MachineInstr::getNumDefs
unsigned getNumDefs() const
Returns the total number of definitions.
Definition: MachineInstr.h:567
llvm::MIPatternMatch::operand_type_match::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:204
llvm::MIPatternMatch::OneNonDBGUse_match
Definition: MIPatternMatch.h:49
llvm::MIPatternMatch::m_GFCst
GFCstAndRegMatch m_GFCst(Optional< FPValueAndVReg > &FPValReg)
Definition: MIPatternMatch.h:119
llvm::MIPatternMatch::m_GSExt
UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > m_GSExt(const SrcTy &Src)
Definition: MIPatternMatch.h:492
LHS
Value * LHS
Definition: X86PartialReduction.cpp:73
llvm::MIPatternMatch::m_GMul
BinaryOp_match< LHS, RHS, TargetOpcode::G_MUL, true > m_GMul(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:398
llvm::MIPatternMatch::ConstantMatch
Definition: MIPatternMatch.h:78
llvm::MIPatternMatch::TernaryOp_match::TernaryOp_match
TernaryOp_match(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
Definition: MIPatternMatch.h:612
llvm::MIPatternMatch::m_GZExt
UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > m_GZExt(const SrcTy &Src)
Definition: MIPatternMatch.h:497
llvm::MIPatternMatch::OneNonDBGUse_match::OneNonDBGUse_match
OneNonDBGUse_match(const SubPatternT &SP)
Definition: MIPatternMatch.h:51
llvm::MIPatternMatch::GFCstOrSplatGFCstMatch
Definition: MIPatternMatch.h:123
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MachineInstr::getOperand
const MachineOperand & getOperand(unsigned i) const
Definition: MachineInstr.h:499
llvm::MIPatternMatch::Or::match
bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)
Definition: MIPatternMatch.h:234
llvm::MIPatternMatch::GCstAndRegMatch
Definition: MIPatternMatch.h:97
llvm::MIPatternMatch::SpecificConstantMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:142
InstrTypes.h
llvm::MIPatternMatch::SpecificConstantOrSplatMatch
Matcher for a specific constant or constant splat.
Definition: MIPatternMatch.h:170
Utils.h
llvm::MIPatternMatch::bind_ty
Definition: MIPatternMatch.h:299
llvm::MIPatternMatch::m_GIntToPtr
UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > m_GIntToPtr(const SrcTy &Src)
Definition: MIPatternMatch.h:525
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition: MachineOperand.h:49
llvm::MIPatternMatch::m_ZeroInt
SpecificConstantMatch m_ZeroInt()
{ Convenience matchers for specific integer values.
Definition: MIPatternMatch.h:192
llvm::MIPatternMatch::Or< Pred, Preds... >::match
bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)
Definition: MIPatternMatch.h:245
llvm::MIPatternMatch::m_GFCstOrSplat
GFCstOrSplatGFCstMatch m_GFCstOrSplat(Optional< FPValueAndVReg > &FPValReg)
Definition: MIPatternMatch.h:134
llvm::ConstantFP
ConstantFP - Floating Point Values [float, double].
Definition: Constants.h:257
llvm::MIPatternMatch::BinaryOpc_match
Definition: MIPatternMatch.h:343
llvm::MIPatternMatch::Or< Pred, Preds... >::Or
Or(Pred &&p, Preds &&... preds)
Definition: MIPatternMatch.h:242
llvm::MIPatternMatch::bind_helper< MachineInstr * >::bind
static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI, Register Reg)
Definition: MIPatternMatch.h:266
llvm::MIPatternMatch::m_SpecificICst
SpecificConstantMatch m_SpecificICst(int64_t RequestedValue)
Matches a constant equal to RequestedValue.
Definition: MIPatternMatch.h:149
llvm::MIPatternMatch::OneUse_match::OneUse_match
OneUse_match(const SubPatternT &SP)
Definition: MIPatternMatch.h:37
llvm::MIPatternMatch::UnaryOp_match::match
bool match(const MachineRegisterInfo &MRI, OpTy &&Op)
Definition: MIPatternMatch.h:474
llvm::MIPatternMatch::m_MInstr
bind_ty< MachineInstr * > m_MInstr(MachineInstr *&MI)
Definition: MIPatternMatch.h:310
llvm::MIPatternMatch::m_Pred
bind_ty< CmpInst::Predicate > m_Pred(CmpInst::Predicate &P)
Definition: MIPatternMatch.h:312
llvm::MIPatternMatch::m_SpecificType
CheckType m_SpecificType(LLT Ty)
Definition: MIPatternMatch.h:604
llvm::MIPatternMatch::GFCstOrSplatGFCstMatch::FPValReg
Optional< FPValueAndVReg > & FPValReg
Definition: MIPatternMatch.h:124
llvm::MIPatternMatch::UnaryOp_match
Definition: MIPatternMatch.h:469
llvm::MIPatternMatch::m_GAnyExt
UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > m_GAnyExt(const SrcTy &Src)
Definition: MIPatternMatch.h:487
llvm::MIPatternMatch::CompareOp_match::match
bool match(const MachineRegisterInfo &MRI, OpTy &&Op)
Definition: MIPatternMatch.h:567
llvm::MIPatternMatch::SpecificConstantMatch::SpecificConstantMatch
SpecificConstantMatch(int64_t RequestedVal)
Definition: MIPatternMatch.h:141
llvm::MIPatternMatch::m_GOr
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true > m_GOr(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:433
llvm::MachineOperand::isReg
bool isReg() const
isReg - Tests if this is a MO_Register operand.
Definition: MachineOperand.h:321
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:64
llvm::MIPatternMatch::BinaryOp_match
Definition: MIPatternMatch.h:321
const
aarch64 promote const
Definition: AArch64PromoteConstant.cpp:232
llvm::MIPatternMatch::OneNonDBGUse_match::SubPat
SubPatternT SubPat
Definition: MIPatternMatch.h:50
llvm::MIPatternMatch::And< Pred, Preds... >::match
bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)
Definition: MIPatternMatch.h:227
llvm::MIPatternMatch::bind_ty::VR
Class & VR
Definition: MIPatternMatch.h:300
llvm::MIPatternMatch::Or
Definition: MIPatternMatch.h:232
llvm::MIPatternMatch::m_CommutativeBinOp
BinaryOpc_match< LHS, RHS, true > m_CommutativeBinOp(unsigned Opcode, const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:374
llvm::MIPatternMatch::matchConstant
Optional< ConstT > matchConstant(Register, const MachineRegisterInfo &)
Definition: MIPatternMatch.h:67
llvm::MIPatternMatch::m_AllOnesInt
SpecificConstantMatch m_AllOnesInt()
Definition: MIPatternMatch.h:193
llvm::MIPatternMatch::And
Matching combinators.
Definition: MIPatternMatch.h:213
llvm::MIPatternMatch::CheckType::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:599
llvm::MachineOperand::getPredicate
unsigned getPredicate() const
Definition: MachineOperand.h:588
llvm::MIPatternMatch::GFCstOrSplatGFCstMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:127
llvm::MIPatternMatch::m_Type
bind_ty< LLT > m_Type(LLT Ty)
Definition: MIPatternMatch.h:311
llvm::MIPatternMatch::SpecificConstantSplatMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:158
llvm::getIConstantVRegVal
Optional< APInt > getIConstantVRegVal(Register VReg, const MachineRegisterInfo &MRI)
If VReg is defined by a G_CONSTANT, return the corresponding value.
Definition: Utils.cpp:280
llvm::MachineOperand::getReg
Register getReg() const
getReg - Returns the register number.
Definition: MachineOperand.h:360
llvm::MIPatternMatch::OneNonDBGUse_match::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:53
llvm::MIPatternMatch::bind_ty::bind_ty
bind_ty(Class &V)
Definition: MIPatternMatch.h:302
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::MIPatternMatch::TernaryOp_match::Src2
Src2Ty Src2
Definition: MIPatternMatch.h:610
llvm::MIPatternMatch::BinaryOp_match::match
bool match(const MachineRegisterInfo &MRI, OpTy &&Op)
Definition: MIPatternMatch.h:327
llvm::MIPatternMatch::GCstAndRegMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:100
llvm::MIPatternMatch::GFCstAndRegMatch::GFCstAndRegMatch
GFCstAndRegMatch(Optional< FPValueAndVReg > &FPValReg)
Definition: MIPatternMatch.h:112
llvm::getIConstantVRegValWithLookThrough
Optional< ValueAndVReg > getIConstantVRegValWithLookThrough(Register VReg, const MachineRegisterInfo &MRI, bool LookThroughInstrs=true)
If VReg is defined by a statically evaluable chain of instructions rooted on a G_CONSTANT returns its...
Definition: Utils.cpp:401
llvm::MachineInstr::getOpcode
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
Definition: MachineInstr.h:489
llvm::MIPatternMatch::m_any_of
Or< Preds... > m_any_of(Preds &&... preds)
Definition: MIPatternMatch.h:254
llvm::MIPatternMatch::m_GXor
BinaryOp_match< LHS, RHS, TargetOpcode::G_XOR, true > m_GXor(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:428
llvm::MIPatternMatch::ConstantMatch::ConstantMatch
ConstantMatch(ConstT &C)
Definition: MIPatternMatch.h:80
llvm::MIPatternMatch::TernaryOp_match::Src1
Src1Ty Src1
Definition: MIPatternMatch.h:609
llvm::MIPatternMatch::bind_helper::bind
static bool bind(const MachineRegisterInfo &MRI, BindTy &VR, BindTy &V)
Definition: MIPatternMatch.h:259
llvm::MIPatternMatch::m_Copy
UnaryOp_match< SrcTy, TargetOpcode::COPY > m_Copy(SrcTy &&Src)
Definition: MIPatternMatch.h:546
MRI
unsigned const MachineRegisterInfo * MRI
Definition: AArch64AdvSIMDScalarPass.cpp:105
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::MIPatternMatch::m_SpecificICstOrSplat
SpecificConstantOrSplatMatch m_SpecificICstOrSplat(int64_t RequestedValue)
Matches a RequestedValue constant or a constant splat of RequestedValue.
Definition: MIPatternMatch.h:186
llvm::MIPatternMatch::SpecificConstantOrSplatMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:174
llvm::MIPatternMatch::m_GAShr
BinaryOp_match< LHS, RHS, TargetOpcode::G_ASHR, false > m_GAShr(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:452
llvm::MIPatternMatch::And::match
bool match(const MachineRegisterInfo &MRI, MatchSrc &&src)
Definition: MIPatternMatch.h:215
std
Definition: BitVector.h:838
llvm::MIPatternMatch::m_ICst
ConstantMatch< APInt > m_ICst(APInt &Cst)
Definition: MIPatternMatch.h:90
llvm::MIPatternMatch::m_GFCmp
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP > m_GFCmp(const Pred &P, const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:590
llvm::MIPatternMatch::m_GAdd
BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, true > m_GAdd(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:380
llvm::MIPatternMatch::m_GFSqrt
UnaryOp_match< SrcTy, TargetOpcode::G_FSQRT > m_GFSqrt(const SrcTy &Src)
Definition: MIPatternMatch.h:551
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:325
llvm::MIPatternMatch::m_GCst
GCstAndRegMatch m_GCst(Optional< ValueAndVReg > &ValReg)
Definition: MIPatternMatch.h:106
llvm::MIPatternMatch::CompareOp_match::P
Pred_P P
Definition: MIPatternMatch.h:559
llvm::MIPatternMatch::CompareOp_match
Definition: MIPatternMatch.h:558
llvm::MIPatternMatch::And< Pred, Preds... >::P
Pred P
Definition: MIPatternMatch.h:222
llvm::MIPatternMatch::GFCstAndRegMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:113
llvm::MIPatternMatch::m_GISelect
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_SELECT > m_GISelect(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
Definition: MIPatternMatch.h:637
llvm::getFConstantVRegValWithLookThrough
Optional< FPValueAndVReg > getFConstantVRegValWithLookThrough(Register VReg, const MachineRegisterInfo &MRI, bool LookThroughInstrs=true)
If VReg is defined by a statically evaluable chain of instructions rooted on a G_FCONSTANT returns it...
Definition: Utils.cpp:415
llvm::MIPatternMatch::CompareOp_match::L
LHS_P L
Definition: MIPatternMatch.h:560
llvm::MIPatternMatch::ConstantMatch::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:81
llvm::MIPatternMatch::bind_helper
Definition: MIPatternMatch.h:258
llvm::MIPatternMatch::OneUse_match::SubPat
SubPatternT SubPat
Definition: MIPatternMatch.h:36
llvm::MIPatternMatch::CompareOp_match::CompareOp_match
CompareOp_match(const Pred_P &Pred, const LHS_P &LHS, const RHS_P &RHS)
Definition: MIPatternMatch.h:563
llvm::MIPatternMatch::SpecificConstantOrSplatMatch::SpecificConstantOrSplatMatch
SpecificConstantOrSplatMatch(int64_t RequestedVal)
Definition: MIPatternMatch.h:172
llvm::Pattern
Definition: FileCheckImpl.h:614
llvm::MIPatternMatch::bind_helper< const ConstantFP * >::bind
static bool bind(const MachineRegisterInfo &MRI, const ConstantFP *&F, Register Reg)
Definition: MIPatternMatch.h:290
llvm::MIPatternMatch::m_GFPTrunc
UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > m_GFPTrunc(const SrcTy &Src)
Definition: MIPatternMatch.h:531
llvm::MIPatternMatch::m_GBitcast
UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > m_GBitcast(const SrcTy &Src)
Definition: MIPatternMatch.h:513
llvm::MIPatternMatch::operand_type_match
}
Definition: MIPatternMatch.h:203
llvm::getFConstantSplat
Optional< FPValueAndVReg > getFConstantSplat(Register VReg, const MachineRegisterInfo &MRI, bool AllowUndef=true)
Returns a floating point scalar constant of a build vector splat if it exists.
Definition: Utils.cpp:1073
llvm::MIPatternMatch::SpecificConstantSplatMatch::SpecificConstantSplatMatch
SpecificConstantSplatMatch(int64_t RequestedVal)
Definition: MIPatternMatch.h:156
llvm::MachineInstr::getNumOperands
unsigned getNumOperands() const
Retuns the total number of operands.
Definition: MachineInstr.h:492
llvm::MIPatternMatch::m_GFMul
BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, true > m_GFMul(const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:410
llvm::MIPatternMatch::m_Neg
BinaryOp_match< SpecificConstantMatch, SrcTy, TargetOpcode::G_SUB > m_Neg(const SrcTy &&Src)
Matches a register negated by a G_SUB.
Definition: MIPatternMatch.h:646
llvm::MIPatternMatch::OneUse_match
Definition: MIPatternMatch.h:35
llvm::MIPatternMatch::GFCstOrSplatGFCstMatch::GFCstOrSplatGFCstMatch
GFCstOrSplatGFCstMatch(Optional< FPValueAndVReg > &FPValReg)
Definition: MIPatternMatch.h:125
llvm::MIPatternMatch::BinaryOp_match::BinaryOp_match
BinaryOp_match(const LHS_P &LHS, const RHS_P &RHS)
Definition: MIPatternMatch.h:325
llvm::isBuildVectorConstantSplat
bool isBuildVectorConstantSplat(const Register Reg, const MachineRegisterInfo &MRI, int64_t SplatValue, bool AllowUndef)
Return true if the specified register is defined by G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all ...
Definition: Utils.cpp:1049
llvm::MIPatternMatch::bind_helper< MachineInstr * >::bind
static bool bind(const MachineRegisterInfo &MRI, MachineInstr *&MI, MachineInstr *Inst)
Definition: MIPatternMatch.h:273
llvm::getConstantFPVRegVal
const ConstantFP * getConstantFPVRegVal(Register VReg, const MachineRegisterInfo &MRI)
Definition: Utils.cpp:426
llvm::MIPatternMatch::m_all_of
And< Preds... > m_all_of(Preds &&... preds)
Definition: MIPatternMatch.h:250
llvm::MIPatternMatch::CheckType::Ty
LLT Ty
Definition: MIPatternMatch.h:596
llvm::MIPatternMatch::GCstAndRegMatch::ValReg
Optional< ValueAndVReg > & ValReg
Definition: MIPatternMatch.h:98
llvm::MIPatternMatch::m_Not
BinaryOp_match< SrcTy, SpecificConstantMatch, TargetOpcode::G_XOR, true > m_Not(const SrcTy &&Src)
Matches a register not-ed by a G_XOR.
Definition: MIPatternMatch.h:654
llvm::MIPatternMatch::OneUse_match::match
bool match(const MachineRegisterInfo &MRI, Register Reg)
Definition: MIPatternMatch.h:39
llvm::MIPatternMatch::mi_match
bool mi_match(Reg R, const MachineRegisterInfo &MRI, Pattern &&P)
Definition: MIPatternMatch.h:25
llvm::MIPatternMatch::TernaryOp_match
Definition: MIPatternMatch.h:607
llvm::MIPatternMatch::m_BinOp
BinaryOpc_match< LHS, RHS, false > m_BinOp(unsigned Opcode, const LHS &L, const RHS &R)
Definition: MIPatternMatch.h:367
llvm::MIPatternMatch::TernaryOp_match::Src0
Src0Ty Src0
Definition: MIPatternMatch.h:608
llvm::MIPatternMatch::m_GInsertVecElt
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_INSERT_VECTOR_ELT > m_GInsertVecElt(const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
Definition: MIPatternMatch.h:630
llvm::MIPatternMatch::GFCstAndRegMatch
Definition: MIPatternMatch.h:110
llvm::MIPatternMatch::m_OneUse
OneUse_match< SubPat > m_OneUse(const SubPat &SP)
Definition: MIPatternMatch.h:45
llvm::MIPatternMatch::SpecificConstantMatch
Matcher for a specific constant value.
Definition: MIPatternMatch.h:139
llvm::MIPatternMatch::ConstantMatch::CR
ConstT & CR
Definition: MIPatternMatch.h:79
llvm::MIPatternMatch::SpecificConstantSplatMatch
Matcher for a specific constant splat.
Definition: MIPatternMatch.h:154
llvm::MIPatternMatch::And< Pred, Preds... >::And
And(Pred &&p, Preds &&... preds)
Definition: MIPatternMatch.h:223
llvm::MIPatternMatch::CompareOp_match::R
RHS_P R
Definition: MIPatternMatch.h:561
llvm::LLT
Definition: LowLevelTypeImpl.h:39