fallback: translate: srem i128

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: srem i128 M
Occurrences:3 in 3 configs, 3 test files, 7 more counted only
Snippet from:div_minsize.a9a2ed6b.754335a389.ll (mutant of div_minsize.a9a2ed6b.ll) @i128_sdiv via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zhinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i32

; Function Attrs: minsize nounwind
define i128 @i128_sdiv(i128 %arg0) #0 {
  %B3 = srem i128 %arg0, %arg0
  %LGV = load i32, ptr @G, align 4
  switch i32 %LGV, label %SW_D [
    i32 -1106861593, label %SW_C
  ]

BB:                                               ; preds = %SW_D
  %B = shl i128 %arg0, -170141183460469231731687303715884105728
  ret i128 %B

SW_D:                                             ; preds = %0
  br label %BB

SW_C:                                             ; preds = %0
  ret i128 %B3
}

attributes #0 = { minsize nounwind }

Reproduce:

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

Local llc output:

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

Occurrences (3):

InputFunctionConfig
attributes.bc0bade54a.ll (mutant of attributes.ll)atomic_load_i8_seq_cst-mtriple=riscv64 -mattr=+smrnmi,+zfinx,+zicond -O1 -verify-machineinstrs
div_minsize.a9a2ed6b.754335a389.ll (mutant of div_minsize.a9a2ed6b.ll)i128_sdiv-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zhinx -O0
rv64zfh-half-convert-strict.dea3d929d2.ll (mutant of rv64zfh-half-convert-strict.ll)sitofp_zext_i32_to_f16-mtriple=riscv64 -verify-machineinstrs -target-abi lp64 -disable-strictnode-mutation -mattr=+zhinx,+zihintpause,+zicsr -O2

Generated 2026-11-29 14:49 UTC.