fallback: translate: call llvm.memset.p0.i32

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: call llvm.memset.p0.i32 M
Occurrences:6 in 4 configs, 2 test files, 5 more counted only
Snippet from:memset.d1eadcffa0.ll (mutant of memset.ll) @memset_i32_var via llvm-extract
Config:-mtriple=riscv32 -mattr=+zfinx,+zhinx -O2 -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i8

; Function Attrs: nounwind
define void @memset_i32_var(ptr %dest, i8 %val, i32 %n) #0 {
entry:
  call void @llvm.memset.p0.i32(ptr %dest, i8 %val, i32 %n, i1 false)
  %B = srem i8 %val, %val
  store i8 %B, ptr @G, align 1
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i32(ptr writeonly captures(none), i8, i32, i1 immarg) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: write) }

Reproduce:

llc -mtriple=riscv32 -mattr=+zfinx,+zhinx -O2 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+zfinx,+zhinx -O2 -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.memset.p0.i32: '  call void @llvm.memset.p0.i32(ptr align 1 %dest, i8 %val, i32 %n, i1 false)' (in function: memset_i32_var)
warning: Instruction selection used fallback path for memset_i32_var

Occurrences (6):

InputFunctionConfig
memset.ac03c6d3a6.ll (mutant of memset.ll)memset_i32_var-mtriple=riscv64 -mattr=+zdinx -O3 -verify-machineinstrs
memset.ac03c6d3a6.ll (mutant of memset.ll)memset_zero_i32_2147483648-mtriple=riscv64 -mattr=+zdinx -O3 -verify-machineinstrs
memset.d1eadcffa0.ll (mutant of memset.ll)memset_i32_var-mtriple=riscv32 -mattr=+zfinx,+zhinx -O2 -verify-machineinstrs
xqcilsm-memset.0a463bc8e8.ll (mutant of xqcilsm-memset.ll)test7a_unalign-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx -O2
xqcilsm-memset.0a463bc8e8.ll (mutant of xqcilsm-memset.ll)test15b-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx -O2
xqcilsm-memset.6d887a1d4b.ll (mutant of xqcilsm-memset.ll)test2a-mtriple=riscv32 -verify-machineinstrs -mattr=+xqcilsm,+zdinx -O2

Generated 2026-11-29 14:49 UTC.