fallback: legalize: G_VECTOR_COMPRESS <N x i16>,<N x i1>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_VECTOR_COMPRESS <N x i16>,<N x i1> M
Occurrences:4 in 4 configs, 2 test files, 2 more counted only
Snippet from:fixed-vectors-compress-int.35853e86af.ll (mutant of fixed-vectors-compress-int.ll) @vector_compress_v8i16_passthru via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O3 -code-model=medium
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define <8 x i16> @vector_compress_v8i16_passthru(<8 x i16> %passthru, <8 x i16> %v, <8 x i1> %mask) {
  %E = extractelement <2 x i64> splat (i64 42), i8 1
  %ret = call <8 x i16> @llvm.experimental.vector.compress.v8i16(<8 x i16> %v, <8 x i1> %mask, <8 x i16> %passthru)
  store i64 %E, ptr poison, align 4
  ret <8 x i16> %ret
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare <8 x i16> @llvm.experimental.vector.compress.v8i16(<8 x i16>, <8 x i1>, <8 x i16>) #0

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

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m -O3 -code-model=medium -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m -O3 -code-model=medium -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %11:_(<8 x i16>) = G_VECTOR_COMPRESS %1:_, %2:_(<8 x i1>), %0:_ (in function: vector_compress_v8i16_passthru)
warning: Instruction selection used fallback path for vector_compress_v8i16_passthru

Occurrences (4):

InputFunctionConfig
fixed-vectors-compress-int.35853e86af.ll (mutant of fixed-vectors-compress-int.ll)vector_compress_v8i16_passthru-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O3 -code-model=medium
fixed-vectors-compress-int.cf1f9692.1df62f7da4.ll (mutant of fixed-vectors-compress-int.cf1f9692.ll)vector_compress_v4i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O3
fixed-vectors-compress-int.cf1f9692.77f5b2564e.ll (mutant of fixed-vectors-compress-int.cf1f9692.ll)vector_compress_v4i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbs -O3
fixed-vectors-compress-int.cf1f9692.a7dca572fb.ll (mutant of fixed-vectors-compress-int.cf1f9692.ll)vector_compress_v4i16-mtriple=riscv32 -verify-machineinstrs -mattr=+m -O2

Generated 2026-11-29 14:49 UTC.