fallback: legalize: G_PHI <N x f64>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_PHI <N x f64> M
Occurrences:3 in 3 configs, 1 test files, 19 more counted only
Snippet from:fixed-vectors-masked-gather.60ed66dac4.ll (mutant of fixed-vectors-masked-gather.ll) @mgather_baseidx_sext_v8i16_v8f64 via llvm-extract
Config:-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b,+zcb -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.101 = external global bfloat

define <8 x double> @mgather_baseidx_sext_v8i16_v8f64(ptr %base, <8 x i16> %idxs, <8 x i1> %m, <8 x double> %passthru) {
  %eidxs = sext <8 x i16> %idxs to <8 x i64>
  %B = frem bfloat 4.200000e+01, +inf
  %ptrs = getelementptr inbounds double, ptr %base, <8 x i64> %eidxs
  %v = call <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr> align 8 %ptrs, <8 x i1> %m, <8 x double> %passthru)
  store bfloat %B, ptr @G.101, align 2
  ret <8 x double> %v
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(read)
declare <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr>, <8 x i1>, <8 x double>) #0

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

Reproduce:

llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b,+zcb -O3 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b,+zcb -O3 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %89:_(<8 x f64>) = G_PHI %88:_(<8 x f64>), %bb.16, %81:_(<8 x f64>), %bb.15 (in function: mgather_baseidx_sext_v8i16_v8f64)
warning: Instruction selection used fallback path for mgather_baseidx_sext_v8i16_v8f64

Occurrences (3):

InputFunctionConfig
fixed-vectors-masked-gather.60ed66dac4.ll (mutant of fixed-vectors-masked-gather.ll)mgather_baseidx_sext_v8i16_v8f64-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b,+zcb -O3
fixed-vectors-masked-gather.cb34b4685e.ll (mutant of fixed-vectors-masked-gather.ll)mgather_baseidx_sext_v8i8_v8f64-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvl128b -O1
fixed-vectors-masked-gather.e07e8761aa.ll (mutant of fixed-vectors-masked-gather.ll)mgather_baseidx_v8f64-mtriple=riscv64 -target-abi=lp64d -verify-machineinstrs -mattr=+m,+d,+zfhmin,+zvfhmin,+zfbfmin,+zvfbfmin,+zve32f,+zvl128b,+zcb -O2

Generated 2026-11-29 14:49 UTC.