fallback: legalize: G_PHI <N x i16>

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:legalize: G_PHI <N x i16> M
Occurrences:3 in 2 configs, 2 test files, 26 more counted only
Snippet from:fixed-vectors-masked-load-int.75f4dfb1fe.ll (mutant of fixed-vectors-masked-load-int.ll) @masked_load_v2i16 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zve32x -O3
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define <2 x i16> @masked_load_v2i16(ptr %a, <2 x i1> %mask) {
  %A = alloca ptr, align 8
  store ptr poison, ptr %A, align 8
  %load = call <2 x i16> @llvm.masked.load.v2i16.p0(ptr align 8 %a, <2 x i1> %mask, <2 x i16> poison)
  %G = getelementptr ptr, ptr %a, i8 -128
  store ptr %G, ptr %A, align 8
  ret <2 x i16> %load
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare <2 x i16> @llvm.masked.load.v2i16.p0(ptr captures(none), <2 x i1>, <2 x i16>) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %25:_(<2 x i16>) = G_PHI %23:_(<2 x i16>), %bb.4, %16:_(<2 x i16>), %bb.3 (in function: masked_load_v2i16)
warning: Instruction selection used fallback path for masked_load_v2i16

Occurrences (3):

InputFunctionConfig
fixed-vectors-expandload-int.2e03d5dd1c.ll (mutant of fixed-vectors-expandload-int.ll)expandload_v4i16-verify-machineinstrs -mtriple=riscv32 -mattr=+m,+f -O2
fixed-vectors-expandload-int.2e03d5dd1c.ll (mutant of fixed-vectors-expandload-int.ll)expandload_v8i16-verify-machineinstrs -mtriple=riscv32 -mattr=+m,+f -O2
fixed-vectors-masked-load-int.75f4dfb1fe.ll (mutant of fixed-vectors-masked-load-int.ll)masked_load_v2i16-mtriple=riscv32 -verify-machineinstrs -mattr=+zve32x -O3

Generated 2026-11-29 14:49 UTC.