fallback: legalize: G_SEXTLOAD s256,p0,s128

Run:main-04ca53e65f-20261014-105623
Kind:fallback
Category:legalize: G_SEXTLOAD s256,p0,s128
Occurrences:12 in 2 configs, 2 test files
Snippet from:abds.ll @abd_ext_i128 via llvm-extract
Config:-mtriple=riscv32
Local check:reproduces at 04ca53e65f
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i128 @abd_ext_i128(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 false)
  %trunc = trunc i256 %abs to i128
  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 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %6:_(s256) = G_SEXTLOAD %4:_(p0) :: (load (s128), align 8) (in function: abd_ext_i128)
warning: Instruction selection used fallback path for abd_ext_i128

Occurrences (12):

InputFunctionConfig
abds-neg.llabd_ext_i128-mtriple=riscv32
abds-neg.llabd_ext_i128_undef-mtriple=riscv32
abds-neg.llabd_ext_i128-mtriple=riscv32 -mattr=+zbb
abds-neg.llabd_ext_i128_undef-mtriple=riscv32 -mattr=+zbb
abds.llabd_ext_i128-mtriple=riscv32
abds.llabd_ext_i128_undef-mtriple=riscv32
abds.llabd_ext_i128-mtriple=riscv32 -mattr=+zbb
abds.llabd_ext_i128_undef-mtriple=riscv32 -mattr=+zbb
abds-neg.44c470ad65.ll (mutant of abds-neg.ll)abd_ext_i128_undef-mtriple=riscv32
abds-neg.860617b024.ll (mutant of abds-neg.ll)abd_ext_i128_undef-mtriple=riscv32 -mattr=+zbb
abds.a837bc4bb1.ll (mutant of abds.ll)abd_ext_i128_undef-mtriple=riscv32
abds.f3e2448722.ll (mutant of abds.ll)abd_ext_i128_undef-mtriple=riscv32 -mattr=+zbb

Generated 2026-10-15 08:05 UTC.