[llvm] [SandboxVec][SeedCollection] Support pass argument for enabling different types (PR #155079)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 15:46:35 PDT 2026


================
@@ -617,3 +617,30 @@ define void @foo(i8 %v0, i8 %v1) {
       EXPECT_FALSE(sandboxir::VecUtils::matchPack(NotPack));
   }
 }
+
+TEST_F(VecUtilsTest, GetAuxPassArg) {
+  // Check no aux argument.
+  EXPECT_EQ(sandboxir::VecUtils::getAuxPassArg("no aux arg"), "");
+  // Check an illegal aux argument.
+  EXPECT_EQ(sandboxir::VecUtils::getAuxPassArg("illegal (arg) other"), "");
+  // Check a valid argument.
+  EXPECT_EQ(sandboxir::VecUtils::getAuxPassArg("(some arg)other stuff"),
+            "some arg");
+  // Missing token.
+  EXPECT_DEBUG_DEATH(sandboxir::VecUtils::getAuxPassArg("(arg other"),
+                     "Missing.*");
----------------
vporpo wrote:

I updated the patch. We now allow '(' and ')' to show up later in the string, we just don't treat the text inside the parentheses as an aux argument.
We now also check that the parentheses are nested properly, so we don't allow things like "arg other)".

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


More information about the llvm-commits mailing list