[llvm] [IR2Vec] Add support for Cmp predicates in vocabulary and embeddings (PR #156952)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 08:42:35 PDT 2025


================
@@ -345,18 +364,41 @@ Vocabulary::OperandKind Vocabulary::getOperandKind(const Value *Op) {
   return OperandKind::VariableID;
 }
 
+CmpInst::Predicate Vocabulary::getPredicate(unsigned Index) {
+  assert(Index < MaxPredicateKinds && "Invalid predicate index");
----------------
mtrofin wrote:

so Index is relative to the predicates subrange, i.e. Index == 0 is the first predicate?

https://github.com/llvm/llvm-project/pull/156952


More information about the llvm-commits mailing list