fallback: legalize: G_FPTRUNC s32

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_FPTRUNC s32 M
Occurrences:4 in 4 configs, 4 test files, 651 more counted only
Snippet from:fixed-vectors-i2fp.3395a02d13.ll (mutant of fixed-vectors-i2fp.ll) @ui2fp_v2i1_v2bf16 via llvm-extract
Config:-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+zvfbfmin,+f,+d -O2
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.6 = external global <2 x bfloat>

define <2 x bfloat> @ui2fp_v2i1_v2bf16(<2 x i1> %x) {
  %z = uitofp <2 x i1> %x to <2 x bfloat>
  %B = frem <2 x bfloat> %z, splat (bfloat 1.000000e+00)
  store <2 x bfloat> %B, ptr @G.6, align 4
  ret <2 x bfloat> %z
}

Reproduce:

llc -mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+zvfbfmin,+f,+d -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+zvfbfmin,+f,+d -O2 -global-isel=0 snippet.ll -o -

Local llc output:

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

Occurrences (4):

InputFunctionConfig
attributes.f36b3092e9.ll (mutant of attributes.ll)addi-mtriple=riscv64 -mattr=+zvfbfmin -O2 -verify-machineinstrs
bitreverse-zbkb.4f1cad69eb.ll (mutant of bitreverse-zbkb.ll)bitreverse_i8_plain_arg-mtriple=riscv64 -verify-machineinstrs -O0
fixed-vectors-i2fp.3395a02d13.ll (mutant of fixed-vectors-i2fp.ll)ui2fp_v2i1_v2bf16-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+zvfbfmin,+f,+d -O2
stack-offset.e2ec5d59d4.ll (mutant of stack-offset.ll)align_4-mtriple=riscv32 -verify-machineinstrs -O0

Generated 2026-11-29 14:49 UTC.