[llvm] [BPF] Handle unreachable with a unimplemented kfunc call (PR #131731)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 19 11:37:45 PDT 2025


eddyz87 wrote:

> > define void @buz() #0 {
> > entry:
> >   tail call void asm sideeffect "r0 = r1; exit;", ""()
> >   unreachable
> > }
> > ```
> 
> As suggested by @nikic, I will later have a patch to prevent 'unreachable' for naked functions for all architectures. So this test will not be included.

As far as I understand:
- that would be a separate PR merged at some later point;
- the code change in `BPFDAGToDAGISel::Select` is only necessary to handle naked functions.

Thus, I'd keep the test for now, just to have all code paths covered.

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


More information about the llvm-commits mailing list