fallback: translate: call llvm.stacksave.p0

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.stacksave.p0 M
Occurrences:3 in 3 configs, 3 test files, 5 more counted only
Snippet from:xqccmp-push-pop-popret.cd0fde0948.ll (mutant of xqccmp-push-pop-popret.ll) @alloca via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+xqccmp,+save-restore,+zvbb,+zhinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

declare void @notdead(ptr)

define void @alloca(i32 %n) {
  %sp = call ptr @llvm.stacksave.p0()
  %addr = alloca i8, i32 %n, align 1
  %G = getelementptr ptr, ptr %sp, i32 %n
  call void @notdead(ptr %addr)
  call void %G(ptr %sp)
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #0

attributes #0 = { nocallback nofree nosync nounwind willreturn }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+xqccmp,+save-restore,+zvbb,+zhinx -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+xqccmp,+save-restore,+zvbb,+zhinx -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.stacksave.p0: '  %sp = call ptr @llvm.stacksave.p0()' (in function: alloca)
warning: Instruction selection used fallback path for alloca

Occurrences (3):

InputFunctionConfig
saverestore.7ddb7b6b24.ll (mutant of saverestore.ll)alloca-mtriple=riscv64 -mattr=+save-restore,+zhinx,+zbkb -O0 -code-model=small -verify-machineinstrs
stacksave-stackrestore.13e5da310e.ll (mutant of stacksave-stackrestore.ll)test_scoped_alloca-mtriple=riscv64 -mattr=+zfinx -O2 -code-model=medium -verify-machineinstrs
xqccmp-push-pop-popret.cd0fde0948.ll (mutant of xqccmp-push-pop-popret.ll)alloca-mtriple=riscv32 -verify-machineinstrs -mattr=+xqccmp,+save-restore,+zvbb,+zhinx -O0

Generated 2026-11-29 14:49 UTC.