[llvm] [SafeStack] Don't move a scalable byval argument to the unsafe stack (PR #225067)

Jakob Koschel via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 00:36:55 PDT 2026


jakos-sec wrote:

> > Is this something that can happen realistically?
> > I've done some tests with a minimal IR test:
> > ```
> > define void @f(ptr byval(<vscale x 4 x i32>) %p) {
> >   ret void
> > }
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > And this also fails without safestack with `llc -mtriple=aarch64-linux-gnu minimal_byval.ll`.
> > It sounds more like this behaviour is already broken in a bunch of passes and perhaps should be rejected by `opt -passes=verify minimal_byval.ll `?
> 
> You were right on both counts, so I went with the verifier, which means your comment suggestion fell away with the code it was about. If you'd rather keep the SafeStack guard as well, I'll put it back.

The audience for the verifier change is an entirely different set of reviewers and I guess the PR title doesn't reflect this anymore. I'd suggest opening a new PR with that change instead.

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


More information about the llvm-commits mailing list