Go to the documentation of this file.
19 return match(U, m_Intrinsic<Intrinsic::experimental_guard>());
23 Value *Condition, *WidenableCondition;
30 Value *Condition, *WidenableCondition;
35 for (
auto &
Insn : *DeoptBB) {
36 if (
match(&
Insn, m_Intrinsic<Intrinsic::experimental_deoptimize>()))
38 if (
Insn.mayHaveSideEffects())
45 Value *&WidenableCondition,
54 WidenableCondition = WC->get();
63 auto *BI = dyn_cast<BranchInst>(U);
64 if (!BI || !BI->isConditional())
66 auto *
Cond = BI->getCondition();
67 if (!
Cond->hasOneUse())
70 IfTrueBB = BI->getSuccessor(0);
71 IfFalseBB = BI->getSuccessor(1);
73 if (
match(
Cond, m_Intrinsic<Intrinsic::experimental_widenable_condition>())) {
74 WC = &BI->getOperandUse(0);
87 auto *
And = dyn_cast<Instruction>(
Cond);
92 if (
match(A, m_Intrinsic<Intrinsic::experimental_widenable_condition>()) &&
94 WC = &
And->getOperandUse(0);
95 C = &
And->getOperandUse(1);
99 if (
match(
B, m_Intrinsic<Intrinsic::experimental_widenable_condition>()) &&
101 WC = &
And->getOperandUse(1);
102 C = &
And->getOperandUse(0);
This is an optimization pass for GlobalISel generic memory operations.
LLVM Basic Block Representation.
bool isGuard(const User *U)
Returns true iff U has semantics of a guard expressed in a form of call of llvm.experimental....
@ And
Bitwise or logical AND of integers.
bool match(Val *V, const Pattern &P)
(vector float) vec_cmpeq(*A, *B) C
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
BinaryOp_match< LHS, RHS, Instruction::And > m_And(const LHS &L, const RHS &R)
class_match< Value > m_Value()
Match an arbitrary value and ignore it.
bool parseWidenableBranch(const User *U, Value *&Condition, Value *&WidenableCondition, BasicBlock *&IfTrueBB, BasicBlock *&IfFalseBB)
If U is widenable branch looking like: cond = ...
SmallVector< MachineOperand, 4 > Cond
bool isWidenableBranch(const User *U)
Returns true iff U is a widenable branch (that is, parseWidenableBranch returns true).
LLVMContext & getContext() const
Get the context in which this basic block lives.
static ConstantInt * getTrue(LLVMContext &Context)
SmallVector< AArch64_IMM::ImmInsnModel, 4 > Insn
bool isGuardAsWidenableBranch(const User *U)
Returns true iff U has semantics of a guard expressed in a form of a widenable conditional branch to ...
LLVM Value Representation.
A Use represents the edge between a Value definition and its users.