[llvm] [VPlan] Restrict addOperand to sub-classes that need it (NFC). (PR #200692)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 12:48:51 PDT 2026
================
@@ -1443,6 +1443,47 @@ bool VPInstruction::isSingleScalar() const {
}
}
+void VPInstruction::addOperand(VPValue *Op) {
+#ifndef NDEBUG
+ Type *Ty = Op->getScalarType();
+ switch (getOpcode()) {
+ case VPInstruction::AnyOf:
+ case VPInstruction::FirstActiveLane:
+ case VPInstruction::LastActiveLane:
+ assert(Ty == getOperand(0)->getScalarType() && Ty->isIntegerTy(1) &&
+ "appended operand must be an i1 (vector) matching operand 0");
----------------
fhahn wrote:
Yep, I'll do that separately, and removed the bool check here
https://github.com/llvm/llvm-project/pull/200692
More information about the llvm-commits
mailing list