fallback: translate: call llvm.umax.i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.umax.i32 M
Occurrences:4 in 4 configs, 3 test files, 6 more counted only
Snippet from:select-zbb.2c5e485b1f.ll (mutant of select-zbb.ll) @select_umax_4 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbb,+zicsr,+zfinx -O2
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @select_umax_4(i1 zeroext %cond, i32 %x) {
  %minmax = call i32 @llvm.umax.i32(i32 %x, i32 128)
  %sel = select i1 %cond, i32 %minmax, i32 128
  ret i32 %sel
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #0

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

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbb,+zicsr,+zfinx -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbb,+zicsr,+zfinx -O2 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.umax.i32: '  %minmax = call i32 @llvm.umax.i32(i32 %x, i32 128)' (in function: select_umax_4)
warning: Instruction selection used fallback path for select_umax_4

Occurrences (4):

InputFunctionConfig
min-max.9731d7d825.ll (mutant of min-max.ll)umax_i32-mtriple=riscv64 -mattr=+zdinx,+zihintpause -O3 -verify-machineinstrs
select-zbb.2c5e485b1f.ll (mutant of select-zbb.ll)select_umax_4-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbb,+zicsr,+zfinx -O2
short-forward-branch-opt-min-max.646060c0b9.ll (mutant of short-forward-branch-opt-min-max.ll)select_example_umax-mtriple=riscv32 -mattr=+zbb,+short-forward-branch-ialu,+zfinx -O1 -verify-machineinstrs
short-forward-branch-opt-min-max.64c1309757.ll (mutant of short-forward-branch-opt-min-max.ll)select_example_umax-mtriple=riscv32 -mattr=+zdinx -O0 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.