fallback: translate: call llvm.fshr.i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.fshr.i32 M
Occurrences:3 in 3 configs, 2 test files, 9 more counted only
Snippet from:rv32zbb-zbkb.ff323671d5.ll (mutant of rv32zbb-zbkb.ll) @rori_i32_fshr via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i32

; Function Attrs: nounwind
define i32 @rori_i32_fshr(i32 %a) #0 {
  %1 = tail call i32 @llvm.fshr.i32(i32 %a, i32 %a, i32 31)
  %B = ashr i32 %1, 1
  store i32 %B, ptr @G, align 4
  ret i32 %1
}

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

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.fshr.i32: '  %1 = tail call i32 @llvm.fshr.i32(i32 %a, i32 %a, i32 31)' (in function: rori_i32_fshr)
warning: Instruction selection used fallback path for rori_i32_fshr

Occurrences (3):

InputFunctionConfig
rv32zbb-zbkb.bd82e9d779.ll (mutant of rv32zbb-zbkb.ll)ror_i32-mtriple=riscv32 -verify-machineinstrs -mattr=+zhinx -O3
rv32zbb-zbkb.ff323671d5.ll (mutant of rv32zbb-zbkb.ll)rori_i32_fshr-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O0
rv64zbb-zbkb.c006fd92a9.ll (mutant of rv64zbb-zbkb.ll)ror_i32_nosext-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zhinx -O2

Generated 2026-11-29 14:49 UTC.