[llvm] [IR][CodeGen] Specify llvm.gcroot contents are an opaque zero-initialized blob (PR #222333)

Jameson Nash via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 07:14:56 PDT 2026


================
@@ -6514,14 +6514,10 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
       auto *AI =
           dyn_cast<AllocaInst>(Call.getArgOperand(0)->stripPointerCasts());
       Check(AI, "llvm.gcroot parameter #1 must be an alloca.", Call);
+      Check(AI->isStaticAlloca(),
+            "llvm.gcroot parameter #1 must be a static alloca.", Call);
----------------
vtjnash wrote:

That's the job of the frontend to enforce. It isn't LLVM Verifier's job to enforce that your particular GC constraints are encoded (after all, it specifically doesn't know what metadata is either) – LLVM's job is just to be an opaque mover of bytes.

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


More information about the llvm-commits mailing list