fallback: translate: sext i128

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: sext i128 M
Occurrences:3 in 3 configs, 2 test files, 3 more counted only
Snippet from:abds.f8bf26a903.ll (mutant of abds.ll) @abd_ext_i128_undef via llvm-extract
Config:-mtriple=riscv32 -mattr=+zbb,+zdinx -O2 -verify-machineinstrs
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i1

; Function Attrs: nounwind
define i128 @abd_ext_i128_undef(i128 %a, i128 %b) #0 {
  %aext = sext i128 %a to i256
  %bext = sext i128 %b to i256
  %sub = sub i256 %aext, %bext
  %abs = call i256 @llvm.abs.i256(i256 %sub, i1 true)
  %C = icmp slt i128 %b, %b
  %trunc = trunc i256 %abs to i128
  store i1 %C, ptr @G, align 1
  ret i128 %trunc
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i256 @llvm.abs.i256(i256, i1 immarg) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: sext: '  %aext = sext i128 %a to i256' (in function: abd_ext_i128_undef)
warning: Instruction selection used fallback path for abd_ext_i128_undef

Occurrences (3):

InputFunctionConfig
abds-neg.42d2bfcf32.ll (mutant of abds-neg.ll)abd_ext_i128-mtriple=riscv32 -mattr=+zbb,+zfinx,+c -O2 -code-model=medium -verify-machineinstrs
abds-neg.758cc483c1.ll (mutant of abds-neg.ll)abd_ext_i128-mtriple=riscv64 -mattr=+zbb,+zhinx -O1 -verify-machineinstrs
abds.f8bf26a903.ll (mutant of abds.ll)abd_ext_i128_undef-mtriple=riscv32 -mattr=+zbb,+zdinx -O2 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.