[#llvm-isImpliedCondition-0c] = xref:llvm.adoc[llvm]::isImpliedCondition :relfileprefix: ../ :mrdocs: Return whether RHS is implied true or false by LHS, if known. == Synopsis Declared in `<llvm/Analysis/ValueTracking.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<bool> isImpliedCondition( xref:llvm/Value.adoc[Value] const* LHS, xref:llvm/Value.adoc[Value] const* RHS, xref:llvm/DataLayout.adoc[DataLayout] const& DL, bool LHSIsTrue = true, unsigned int Depth = 0); ---- == Description Return true if RHS is known to be implied true by LHS. Return false if RHS is known to be implied false by LHS. Otherwise, return std::nullopt if no implication can be made. A & B must be i1 (boolean) values or a vector of such values. Note that the truth table for implication is the same as <=u on i1 values (but not <=s!). The truth table for both is: | T | F (B) T | T | F F | T | T (A) == Return Value True/false if implied, or nullopt if unknown. == Parameters [cols="1,4"] |=== | Name| Description | *LHS* | Condition assumed true or false according to `LHSIsTrue.` | *RHS* | Condition whose implication from `LHS` is tested. | *DL* | Data layout used by the implication analysis. | *LHSIsTrue* | Whether `LHS` is assumed true (vs false). | *Depth* | Current recursion depth for this query. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#