fallback: translate: srem i32

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: srem i32 M
Occurrences:6 in 6 configs, 6 test files, 101 more counted only
Snippet from:rem.a51d082414.ll (mutant of rem.ll) @srem_pow2 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O1 -code-model=small
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i32 @srem_pow2(i32 %a) #0 {
  %1 = srem i32 %a, 8
  %B = ashr i32 %1, %1
  store i32 %B, ptr poison, align 4
  ret i32 %1
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O1 -code-model=small -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O1 -code-model=small -global-isel=0 snippet.ll -o -

Local llc output:

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

Occurrences (6):

InputFunctionConfig
fixed-vectors-ctlz-vp.612768f13c.ll (mutant of fixed-vectors-ctlz-vp.ll)vp_ctlz_v4i16-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+m,+zfinx -O2
rem.a51d082414.ll (mutant of rem.ll)srem_pow2-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O1 -code-model=small
rv64f-float-convert.3870e92859.ll (mutant of rv64f-float-convert.ll)uitofp_aext_i32_to_f32-mtriple=riscv64 -target-abi=lp64 -verify-machineinstrs -mattr=+zfinx,+m -O2
scmp.923cd5384f.ll (mutant of scmp.ll)scmp.8.64-mtriple=riscv32 -mattr=+zhinx -O1 -code-model=small -verify-machineinstrs
short-forward-branch-opt-with-branch-with-immediates_32_slt.57d0c7cb46.ll (mutant of short-forward-branch-opt-with-branch-with-immediates_32_slt.ll)branch_with_immSFB_lui-verify-machineinstrs -mtriple=riscv32 -mattr=+xqci,+short-forward-branch-ialu,+short-forward-branch-imul,+short-forward-branch-iload,+m,+zdinx -O1
urem-seteq-illegal-types.e3f968ec54.ll (mutant of urem-seteq-illegal-types.ll)test_urem_negative_odd-mtriple=riscv32 -mattr=+m,+zdinx,+c -O3 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.