[llvm] [VPlan] Add VPInstruction::Intrinsic opcode, use for scalar intrinsics. (PR #207541)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 12:02:32 PDT 2026


================
@@ -1859,9 +1859,10 @@ using VPUtilsTest = VPlanTestBase;
 TEST_F(VPUtilsTest, IsUniformAcrossVFsAndUFsForSingleScalarOpcodes) {
   VPlan &Plan = getPlan();
 
-  // isSingleScalar opcode without operands.
+  // isSingleScalar opcode with a uniform (intrinsic ID) operand.
   std::unique_ptr<VPInstruction> VScale(
-      VPBuilder().createVScale(IntegerType::get(C, 32)));
+      VPBuilder(Plan.getEntry()).createVScale(IntegerType::get(C, 32)));
+  VScale->removeFromParent();
----------------
artagnon wrote:

Hm, can we re-write this test as shown in https://github.com/llvm/llvm-project/pull/196181/changes, except using VPBuilder? This removeFromParent is sort of surprising :(

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


More information about the llvm-commits mailing list