fallback: translate: sext i16

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: sext i16 M
Occurrences:4 in 3 configs, 3 test files, 29 more counted only
Snippet from:abds.8f070ebcf5.ll (mutant of abds.ll) @abd_ext_i16_undef via llvm-extract
Config:-mtriple=riscv64 -mattr=+zbb,+zvbb,+zhinx -O2 -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i16 @abd_ext_i16_undef(i16 %a, i16 %b) #0 {
  %aext = sext i16 %a to i64
  %B = and i64 %aext, %aext
  %trunc = trunc i64 %B to i16
  ret i16 %trunc
}

attributes #0 = { nounwind }

Reproduce:

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

Local llc output:

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

Occurrences (4):

InputFunctionConfig
abds-neg.70040df0d3.ll (mutant of abds-neg.ll)abd_ext_i16_undef-mtriple=riscv32 -mattr=+zfinx -O2 -verify-machineinstrs
abds.8f070ebcf5.ll (mutant of abds.ll)abd_ext_i16_undef-mtriple=riscv64 -mattr=+zbb,+zvbb,+zhinx -O2 -verify-machineinstrs
shl-demanded.854dfff81b.ll (mutant of shl-demanded.ll)sext_shl_trunc_same_size-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx,+zicond -O3
shl-demanded.854dfff81b.ll (mutant of shl-demanded.ll)sext_shl_trunc_smaller-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx,+zicond -O3

Generated 2026-11-29 14:49 UTC.