fallback: legalize: G_FPTRUNC <N x bf16>,<N x f32>

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:legalize: G_FPTRUNC <N x bf16>,<N x f32> M
Occurrences:4 in 4 configs, 1 test files, 8 more counted only
Snippet from:fixed-vectors-fptrunc-vp.48983baedf.ll (mutant of fixed-vectors-fptrunc-vp.ll) @vfptrunc_v2bf16_v2f32_unmasked via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfh,+v -O2 -code-model=small
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define <2 x bfloat> @vfptrunc_v2bf16_v2f32_unmasked(<2 x float> %a, i32 zeroext %vl) {
  %v = fptrunc <2 x float> %a to <2 x bfloat>
  store <2 x bfloat> %v, ptr poison, align 4
  ret <2 x bfloat> %v
}

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfh,+v -O2 -code-model=small -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfh,+v -O2 -code-model=small -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %3:_(<2 x bf16>) = G_FPTRUNC %0:_(<2 x f32>) (in function: vfptrunc_v2bf16_v2f32_unmasked)
warning: Instruction selection used fallback path for vfptrunc_v2bf16_v2f32_unmasked

Occurrences (4):

InputFunctionConfig
fixed-vectors-fptrunc-vp.094181675e.ll (mutant of fixed-vectors-fptrunc-vp.ll)vfptrunc_v2bf16_v2f32_unmasked-mtriple=riscv64 -verify-machineinstrs -mattr=+d,+zvfhmin,+v,+zicsr -O3
fixed-vectors-fptrunc-vp.48983baedf.ll (mutant of fixed-vectors-fptrunc-vp.ll)vfptrunc_v2bf16_v2f32_unmasked-mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfh,+v -O2 -code-model=small
fixed-vectors-fptrunc-vp.a07fe1b5f9.ll (mutant of fixed-vectors-fptrunc-vp.ll)vfptrunc_v2bf16_v2f32_unmasked-mtriple=riscv32 -verify-machineinstrs -mattr=+zvfh,+zvfbfmin -O1
fixed-vectors-fptrunc-vp.c094a6c036.ll (mutant of fixed-vectors-fptrunc-vp.ll)vfptrunc_v2bf16_v2f32-mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfhmin,+zvfbfmin -O3

Generated 2026-11-29 14:49 UTC.