fallback: translate: call llvm.smax.nxv2i32

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: call llvm.smax.nxv2i32 M
Occurrences:4 in 3 configs, 1 test files, 1 more counted only
Snippet from:vmax-vp.cb1644e724.ll (mutant of vmax-vp.ll) @vmax_vv_nxv2i32_unmasked via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+v -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i16

define <vscale x 2 x i32> @vmax_vv_nxv2i32_unmasked(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b, i32 zeroext %evl) {
  %A = alloca i16, align 2
  store i16 poison, ptr %A, align 2
  %LGV = load i16, ptr @G, align 2
  %v = call <vscale x 2 x i32> @llvm.smax.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b)
  %B = ashr i16 %LGV, -32768
  store i16 %B, ptr %A, align 2
  ret <vscale x 2 x i32> %v
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <vscale x 2 x i32> @llvm.smax.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>) #0

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.smax.nxv2i32: '  %v = call <vscale x 2 x i32> @llvm.smax.nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %b)' (in function: vmax_vv_nxv2i32_unmasked)
warning: Instruction selection used fallback path for vmax_vv_nxv2i32_unmasked

Occurrences (4):

InputFunctionConfig
vmax-vp.3453e3aac9.ll (mutant of vmax-vp.ll)vmax_vv_nxv2i32-mtriple=riscv32 -verify-machineinstrs -mattr=+v -O0
vmax-vp.67d1f5afe3.ll (mutant of vmax-vp.ll)vmax_vx_nxv2i32-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zbs -O1 -code-model=small
vmax-vp.9d55e123c9.ll (mutant of vmax-vp.ll)vmax_vx_nxv2i32-mtriple=riscv32 -verify-machineinstrs -mattr=+v -O3
vmax-vp.cb1644e724.ll (mutant of vmax-vp.ll)vmax_vv_nxv2i32_unmasked-mtriple=riscv32 -verify-machineinstrs -mattr=+v -O3

Generated 2026-11-29 14:49 UTC.