[llvm] [CodeGen] Use byte offsets and ptradd in ShadowStackGCLowering (PR #178436)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 14:04:34 PDT 2026


isuckatcs wrote:

Another interesting case is taking a look at this snippet (https://godbolt.org/z/Wr65c9EEb):
```llvm
define void @foo() gc "shadow-stack" {
entry:
  %0 = alloca { i64, ptr }, align 8
  call void @llvm.gcroot(ptr %0, ptr null)
  ret void
}
```
```
error: invalid LLVM IR input: llvm.gcroot parameter #1 must either be a pointer alloca, or argument #2 must be a non-null constant.
  call void @llvm.gcroot(ptr %0, ptr null)
```
The error message also suggests that the first argument can be any `alloca` not just one that allocates a pointer.

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


More information about the llvm-commits mailing list