fallback: translate: srem i128

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: srem i128 M
Occurrences:3 in 3 configs, 3 test files, 12 more counted only
Snippet from:rv64-half-convert.7f30e2c1f1.ll (mutant of rv64-half-convert.ll) @sitofp_i128_to_f16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -target-abi lp64 -mattr=+zhinx -O2
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define half @sitofp_i128_to_f16(i128 %a) #0 {
  %B = srem i128 %a, %a
  %1 = sitofp i128 %B to half
  ret half %1
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -target-abi lp64 -mattr=+zhinx -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -target-abi lp64 -mattr=+zhinx -O2 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: srem: '  %B = srem i128 %a, %a' (in function: sitofp_i128_to_f16)
warning: Instruction selection used fallback path for sitofp_i128_to_f16

Occurrences (3):

InputFunctionConfig
fixed-vectors-unaligned.bb3374abbd.ll (mutant of fixed-vectors-unaligned.ll)load_v4i32_align2-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+unaligned-vector-mem,+zhinx -O3
half-round-conv-sat.fe3e606482.ll (mutant of half-round-conv-sat.ll)test_rint_ui64-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64 -mattr=+zhinx -O0 -code-model=medium
rv64-half-convert.7f30e2c1f1.ll (mutant of rv64-half-convert.ll)sitofp_i128_to_f16-mtriple=riscv64 -verify-machineinstrs -target-abi lp64 -mattr=+zhinx -O2

Generated 2026-11-29 14:49 UTC.