fallback: legalize: G_INTRINSIC_W_SIDE_EFFECTS <N x i32>,<N x p0>,<N x i1>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_INTRINSIC_W_SIDE_EFFECTS <N x i32>,<N x p0>,<N x i1> M
Occurrences:7 in 6 configs, 2 test files, 15 more counted only
Snippet from:fixed-vectors-vpscatter.0eeb60e87d.ll (mutant of fixed-vectors-vpscatter.ll) @vpscatter_baseidx_v8i16_v8i32 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zvfbfmin,+v -O1
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i8

define void @vpscatter_baseidx_v8i16_v8i32(<8 x i32> %val, ptr %base, <8 x i16> %idxs, <8 x i1> %m, i32 zeroext %evl) {
  %A = alloca i1, align 1
  store i1 poison, ptr %A, align 1
  %LGV = load i8, ptr @G, align 1
  %C = icmp ugt i8 %LGV, 42
  %ptrs = getelementptr inbounds i32, ptr %base, <8 x i16> %idxs
  call void @llvm.vp.scatter.v8i32.v8p0(<8 x i32> %val, <8 x ptr> %ptrs, <8 x i1> %m, i32 %evl)
  store i1 %C, ptr %A, align 1
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.vp.scatter.v8i32.v8p0(<8 x i32>, <8 x ptr>, <8 x i1>, i32) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn }

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zvfbfmin,+v -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zvfbfmin,+v -O1 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.vp.scatter), %0:_(<8 x i32>), %21:_(<8 x p0>), %3:_(<8 x i1>), %4:_(i32) (in function: vpscatter_baseidx_v8i16_v8i32)
warning: Instruction selection used fallback path for vpscatter_baseidx_v8i16_v8i32

Occurrences (7):

InputFunctionConfig
fixed-vectors-masked-scatter.16f7f27ca6.ll (mutant of fixed-vectors-masked-scatter.ll)mscatter_baseidx_zext_v8i8_v8i32-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+v,+c,+zfhmin -O3 -code-model=small
fixed-vectors-masked-scatter.e01a2981f4.ll (mutant of fixed-vectors-masked-scatter.ll)mscatter_baseidx_sext_v8i16_v8i32-mtriple=riscv32 -target-abi=ilp32d -verify-machineinstrs -mattr=+m,+d,+zvfh,+zfbfmin,+zvfbfmin,+v -O1
fixed-vectors-vpscatter.0eeb60e87d.ll (mutant of fixed-vectors-vpscatter.ll)vpscatter_baseidx_v8i16_v8i32-mtriple=riscv64 -verify-machineinstrs -mattr=+zvfbfmin,+v -O1
fixed-vectors-vpscatter.7de9645197.ll (mutant of fixed-vectors-vpscatter.ll)vpscatter_baseidx_zext_v8i8_v8i32-mtriple=riscv64 -verify-machineinstrs -mattr=+d,+zvfhmin,+v,+zbkb -O2
fixed-vectors-vpscatter.8001a73dc6.ll (mutant of fixed-vectors-vpscatter.ll)vpscatter_baseidx_v8i8_v8i32-mtriple=riscv64 -verify-machineinstrs -mattr=+d,+zvfh,+zvfbfmin,+v,+zba -O0
fixed-vectors-vpscatter.8001a73dc6.ll (mutant of fixed-vectors-vpscatter.ll)vpscatter_baseidx_v8i16_v8i32-mtriple=riscv64 -verify-machineinstrs -mattr=+d,+zvfh,+zvfbfmin,+v,+zba -O0
fixed-vectors-vpscatter.989ba530fc.ll (mutant of fixed-vectors-vpscatter.ll)vpscatter_baseidx_v8i8_v8i32-mtriple=riscv32 -verify-machineinstrs -mattr=+d,+zvfh,+zvfbfmin,+v -O2 -code-model=small

Generated 2026-11-29 14:49 UTC.