fallback: translate: call llvm.bitreverse.i16

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: call llvm.bitreverse.i16 M
Occurrences:3 in 2 configs, 1 test files, 3 more counted only
Snippet from:bswap-bitreverse.27d47dcd9c.ll (mutant of bswap-bitreverse.ll) @test_bitreverse_i16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zhinx -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.1 = external global i16

; Function Attrs: nounwind
define i16 @test_bitreverse_i16(i16 %a) #0 {
  %tmp = call i16 @llvm.bitreverse.i16(i16 %a)
  store i16 %tmp, ptr @G.1, align 2
  ret i16 %tmp
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.bitreverse.i16(i16) #1

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.bitreverse.i16: '  %tmp = call i16 @llvm.bitreverse.i16(i16 %a)' (in function: test_bitreverse_i16)
warning: Instruction selection used fallback path for test_bitreverse_i16

Occurrences (3):

InputFunctionConfig
bswap-bitreverse.27d47dcd9c.ll (mutant of bswap-bitreverse.ll)test_bitreverse_i16-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zhinx -O3
bswap-bitreverse.92dbf3e526.ll (mutant of bswap-bitreverse.ll)test_bitreverse_bswap_i16-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O2
bswap-bitreverse.cdb05c35d0.ll (mutant of bswap-bitreverse.ll)test_bitreverse_i16-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O2

Generated 2026-11-29 14:49 UTC.