fallback: translate: srem i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: srem i32 M
Occurrences:9 in 9 configs, 9 test files, 66 more counted only
Snippet from:srem-lkk.987f15c2cc.ll (mutant of srem-lkk.ll) @dont_fold_srem_one via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i32 @dont_fold_srem_one(i32 %x) #0 {
  %1 = srem i32 %x, 1
  %B = srem i32 %x, %1
  ret i32 %B
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: srem: '  %1 = srem i32 %x, 1' (in function: dont_fold_srem_one)
warning: Instruction selection used fallback path for dont_fold_srem_one

Occurrences (9):

InputFunctionConfig
arith-with-overflow.b0f3e68742.ll (mutant of arith-with-overflow.ll)ssub-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O2
attributes.1d83e2bb23.ll (mutant of attributes.ll)addi-mtriple=riscv32 -mattr=+c,+zcb,+zdinx -O0 -verify-machineinstrs
fixed-vectors-compressstore-int.be4a8f056a.ll (mutant of fixed-vectors-compressstore-int.ll)compressstore_v1i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zhinx -O2
fixed-vectors-vreductions-mask.f0de298a39.ll (mutant of fixed-vectors-vreductions-mask.ll)vreduce_and_v64i1-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zdinx -O2
half-select-icmp.40a1d427d0.ll (mutant of half-select-icmp.ll)select_icmp_sle-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64 -mattr=+zhinxmin,+zvbb,+zihintpause -O2
rem.8dd7e7f8af.ll (mutant of rem.ll)srem_constant_lhs-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zhinx -O1
rv32zknh-intrinsic.892c60fb72.ll (mutant of rv32zknh-intrinsic.ll)sha512sig0h-mtriple=riscv32 -verify-machineinstrs -mattr=+zknh,+zfinx,+zvkb -O3
srem-lkk.987f15c2cc.ll (mutant of srem-lkk.ll)dont_fold_srem_one-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0
xaluo.b4a90a569b.ll (mutant of xaluo.ll)saddo.not.i32-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zfinx -O3

Generated 2026-11-29 14:49 UTC.