[llvm] [IR][CodeGen] Specify llvm.gcroot contents are an opaque zero-initialized blob (PR #222333)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 21:54:51 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);
----------------
isuckatcs wrote:
These 2 could possible be combined. Also, this now suggests that non-pointer allocas are allowed without metadata, which is once again a behavioral change.
Previously we had an invariant that said "if a root doesn't have a metadata, it is always a pointer". Now that invariant is gone, and the GC has no way to tell what a root without a metadata is.
https://github.com/llvm/llvm-project/pull/222333
More information about the llvm-commits
mailing list