[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


================
@@ -385,11 +386,11 @@ bool ShadowStackGCLoweringImpl::runOnFunction(Function &F,
                          Align(1));
   }
 
-  // Move past the original stores inserted by GCStrategy::InitRoots. This isn't
-  // really necessary (the collector would never see the intermediate state at
-  // runtime), but it's nicer not to push the half-initialized entry onto the
-  // shadow stack.
-  while (isa<StoreInst>(IP))
+  // Move past the original zero-initialization inserted by
+  // GCStrategy::InitRoots. This isn't really necessary (the collector would
+  // never see the intermediate state at runtime), but it's nicer not to push
+  // the half-initialized entry onto the shadow stack.
+  while (isa<StoreInst>(IP) || isa<MemSetInst>(IP))
----------------
isuckatcs wrote:

Aren't other strategies affected by the memset change as well?

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


More information about the llvm-commits mailing list