fallback: translate: call llvm.umax.i32

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: call llvm.umax.i32 M
Occurrences:3 in 2 configs, 2 test files, 10 more counted only
Snippet from:select-zbb.d1a49b5946.ll (mutant of select-zbb.ll) @select_umax_3 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zicond,+zvkb,+zfinx -O2
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i1
@G.1 = external global i32

define i32 @select_umax_3(i1 zeroext %cond, i32 %a) {
entry:
  %c = call i32 @llvm.umax.i32(i32 %a, i32 32)
  %B = ashr i32 %c, %c
  %res = select i1 %cond, i32 %a, i32 %c
  %C = icmp sgt i32 %res, %a
  store i1 %C, ptr @G, align 1
  store i32 %B, ptr @G.1, align 4
  ret i32 %res
}

; 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,+zicond,+zvkb,+zfinx -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zicond,+zvkb,+zfinx -O2 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.umax.i32: '  %c = call i32 @llvm.umax.i32(i32 %a, i32 32)' (in function: select_umax_3)
warning: Instruction selection used fallback path for select_umax_3

Occurrences (3):

InputFunctionConfig
select-zbb.d1a49b5946.ll (mutant of select-zbb.ll)select_umax_3-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zicond,+zvkb,+zfinx -O2
select-zbb.d1a49b5946.ll (mutant of select-zbb.ll)select_umax_4-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zicond,+zvkb,+zfinx -O2
short-forward-branch-opt-min-max.759bab15c2.ll (mutant of short-forward-branch-opt-min-max.ll)select_example_umax-mtriple=riscv64 -mattr=+zbb,+short-forward-branch-iminmax,+zve32x,+zdinx -O3 -code-model=small -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.