Compares two CmpPredicates taking samesign into account and returns the canonicalized CmpPredicate if they match. An alternative to operator==.
Declared in <llvm/IR/CmpPredicate.h>
static
std::optional<CmpPredicate>
getMatching(
CmpPredicate A,
CmpPredicate B);
For example, samesign ult + samesign ult -> samesign ult samesign ult + ult -> ult samesign ult + slt -> slt ult + ult -> ult ult + slt -> std::nullopt
The canonicalized matching CmpPredicate, or std::nullopt if they do not match.
| Name | Description |
|---|---|
| A | The first CmpPredicate. |
| B | The second CmpPredicate. |