fallback: legalize: G_FPTRUNC s32

Run:main-d9924131a4-20261128-102057
Kind:fallback
Category:legalize: G_FPTRUNC s32 M
Occurrences:3 in 3 configs, 1 test files
Snippet from:rv64zbb-zbkb.137688f794.ll (mutant of rv64zbb-zbkb.ll) @rori_i64_fshl via llvm-extract
Config:-mtriple=riscv64 -mattr=+zbkb -verify-machineinstrs
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.1 = external global bfloat

; Function Attrs: nounwind
define i64 @rori_i64_fshl(i64 %a) #0 {
  %LGV = load bfloat, ptr @G.1, align 2
  %1 = tail call i64 @llvm.fshl.i64(i64 %a, i64 %a, i64 63)
  %B = frem bfloat %LGV, +qnan
  store bfloat %B, ptr poison, align 2
  ret i64 %1
}

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

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %6:_(bf16) = G_FPTRUNC %10:_(s32) (in function: rori_i64_fshl)
warning: Instruction selection used fallback path for rori_i64_fshl

Occurrences (3):

InputFunctionConfig
rv64zbb-zbkb.137688f794.ll (mutant of rv64zbb-zbkb.ll)rori_i64_fshl-mtriple=riscv64 -mattr=+zbkb -verify-machineinstrs
rv64zbb-zbkb.46b9b80e01.ll (mutant of rv64zbb-zbkb.ll)rori_i64_fshl-mtriple=riscv64 -mattr=+zbb -verify-machineinstrs
rv64zbb-zbkb.74fdc4e69b.ll (mutant of rv64zbb-zbkb.ll)rori_i64_fshl-mtriple=riscv64 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.