fallback: legalize: G_PHI <N x i8>

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:legalize: G_PHI <N x i8> M
Occurrences:7 in 6 configs, 5 test files, 151 more counted only
Snippet from:fixed-vectors-expandload-int.625b20e410.ll (mutant of fixed-vectors-expandload-int.ll) @expandload_v2i8 via llvm-extract
Config:-verify-machineinstrs -mtriple=riscv64 -mattr=+m -O3 -code-model=small
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global float

define <2 x i8> @expandload_v2i8(ptr %base, <2 x i8> %src0, <2 x i1> %mask) {
  %A = alloca i1, align 1
  store i1 poison, ptr %A, align 1
  %LGV = load float, ptr @G, align 4
  %res = call <2 x i8> @llvm.masked.expandload.v2i8.p0(ptr %base, <2 x i1> %mask, <2 x i8> %src0)
  %C = fcmp olt float f0x7F7FFFFF, %LGV
  store i1 %C, ptr %A, align 1
  ret <2 x i8> %res
}

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

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

Reproduce:

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

Local llc output:

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

Occurrences (7):

InputFunctionConfig
expandload.0199ecf28c.ll (mutant of expandload.ll)test_expandload_v16i8-verify-machineinstrs -mtriple=riscv64 -mattr=+d,+m,+zbb -O0
fixed-vectors-deinterleave-load.3cbcf0cdfa.ll (mutant of fixed-vectors-deinterleave-load.ll)vector_deinterleave_load_factor3_no_extract-mtriple=riscv64 -mattr=+zvfh,+zvfbfmin -O1 -verify-machineinstrs
fixed-vectors-deinterleave-load.d8b119c27b.ll (mutant of fixed-vectors-deinterleave-load.ll)vector_deinterleave_load_factor3_no_extract-mtriple=riscv32 -mattr=+zvfhmin,+zvfbfmin,+zcb -O0 -verify-machineinstrs
fixed-vectors-expandload-int.625b20e410.ll (mutant of fixed-vectors-expandload-int.ll)expandload_v2i8-verify-machineinstrs -mtriple=riscv64 -mattr=+m -O3 -code-model=small
fixed-vectors-expandload-int.625b20e410.ll (mutant of fixed-vectors-expandload-int.ll)expandload_v7i8-verify-machineinstrs -mtriple=riscv64 -mattr=+m -O3 -code-model=small
fixed-vectors-trunc-vp.2648283a.4034b97378.ll (mutant of fixed-vectors-trunc-vp.2648283a.ll)vtrunc_v2i32_v2i64-mtriple=riscv32 -verify-machineinstrs -O2
riscv-codegenprepare-asm.3c9a46cc29.ll (mutant of riscv-codegenprepare-asm.ll)test1-mtriple=riscv64 -mattr=+v,+zcb -O3 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.