fallback: translate: sext i64

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: sext i64 M
Occurrences:3 in 3 configs, 2 test files, 6 more counted only
Snippet from:abds.f45c605090.ll (mutant of abds.ll) @abd_ext_i64_undef via llvm-extract
Config:-mtriple=riscv32 -mattr=+zbb,+zdinx -O1 -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i64

; Function Attrs: nounwind
define i64 @abd_ext_i64_undef(i64 %a, i64 %b) #0 {
  %aext = sext i64 %a to i128
  %bext = sext i64 %b to i128
  %B = srem i64 %a, 0
  %sub = sub i128 %aext, %bext
  %abs = call i128 @llvm.abs.i128(i128 %sub, i1 true)
  %trunc = trunc i128 %abs to i64
  store i64 %B, ptr @G, align 4
  ret i64 %trunc
}

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

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

Reproduce:

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

Local llc output:

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

Occurrences (3):

InputFunctionConfig
abds-neg.70040df0d3.ll (mutant of abds-neg.ll)abd_ext_i64_undef-mtriple=riscv32 -mattr=+zfinx -O2 -verify-machineinstrs
abds.e495019090.ll (mutant of abds.ll)abd_ext_i64_undef-mtriple=riscv64 -mattr=+zbb,+zfinx -O0 -verify-machineinstrs
abds.f45c605090.ll (mutant of abds.ll)abd_ext_i64_undef-mtriple=riscv32 -mattr=+zbb,+zdinx -O1 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.