================
@@ -1024,6 +1024,15 @@ void Verifier::visitMDNode(const MDNode &BaseMD,
       Check(CurrentMD->getNumOperands() == 1,
             "Expecting only the metadata name", CurrentMD);
 
+    // Enforce the single-operand form of the vectorize predication metadata.
+    if (CurrentMD->getNumOperands() > 0 &&
+        (CurrentMD->getOperand(0).equalsStr(
+             "llvm.loop.vectorize.predicate.enable") ||
+         CurrentMD->getOperand(0).equalsStr(
+             "llvm.loop.vectorize.predicate.disable")))
+      Check(CurrentMD->getNumOperands() == 1,
+            "Expecting only the metadata name", CurrentMD);
+
----------------
Meinersbur wrote:

Could this be generalized with the code above?

https://github.com/llvm/llvm-project/pull/213902
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to