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

Timur Baidusenov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 07:00:30 PDT 2026


bai-tim 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.

Makes sense. I've opened #226170 with the verifier change and marked this one as a draft; I'll close it once that lands.

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


More information about the llvm-commits mailing list