[llvm] [VPlan] Add VPInst::getNumOperandsForOpcode, use to verify in ctor (NFC) (PR #142284)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 22 11:45:07 PDT 2025


================
@@ -722,7 +724,7 @@ TEST_F(VPBasicBlockTest, print) {
   VPBB1->setName("bb1");
 
   VPInstruction *I4 = new VPInstruction(Instruction::Mul, {I2, I1});
-  VPInstruction *I5 = new VPInstruction(Instruction::Ret, {I4});
+  VPInstruction *I5 = new VPInstruction(Instruction::Br, {I4});
----------------
ayalz wrote:

Avoid checking return with a single operand? A VPInstruction with an Instruction opcode should retain the latter's number of operands, but that may require checking an underlying Instruction?

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


More information about the llvm-commits mailing list