fallback: translate: call llvm.smax.i32
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | fallback |
| Category: | translate: call llvm.smax.i32 M |
| Occurrences: | 4 in 4 configs, 3 test files, 12 more counted only |
| Snippet from: | min-max.a8429eb093.ll (mutant of min-max.ll) @smax_i32_pos_constant via llvm-extract |
| Config: | -mtriple=riscv64 -mattr=+zbb,+zdinx -O3 -verify-machineinstrs |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G = external global i1
define signext i32 @smax_i32_pos_constant(i32 signext %a) {
%c = call i32 @llvm.smax.i32(i32 %a, i32 10)
%C = icmp sgt i32 %c, %a
store i1 %C, ptr @G, align 1
ret i32 %c
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #0
attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
llc -mtriple=riscv64 -mattr=+zbb,+zdinx -O3 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+zbb,+zdinx -O3 -verify-machineinstrs -global-isel=0 snippet.ll -o -
Local llc output:
remark: <unknown>:0:0: unable to translate instruction: call llvm.smax.i32: ' %c = call i32 @llvm.smax.i32(i32 %a, i32 10)' (in function: smax_i32_pos_constant)
warning: Instruction selection used fallback path for smax_i32_pos_constant
Occurrences (4):
| Input | Function | Config |
|---|
| min-max.a8429eb093.ll (mutant of min-max.ll) | smax_i32_pos_constant | -mtriple=riscv64 -mattr=+zbb,+zdinx -O3 -verify-machineinstrs |
| min-max.c6aec2be16.ll (mutant of min-max.ll) | smax_i32_pos_constant | -mtriple=riscv32 -mattr=+a,+zfinx -O2 -verify-machineinstrs |
| select-zbb.2c5e485b1f.ll (mutant of select-zbb.ll) | select_smax_3 | -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbb,+zicsr,+zfinx -O2 |
| short-forward-branch-opt-min-max.37b2ddd42e.ll (mutant of short-forward-branch-opt-min-max.ll) | select_example_smax | -mtriple=riscv32 -mattr=+zbb,+short-forward-branch-iminmax,+zhinx -O3 -verify-machineinstrs |
Generated 2026-11-29 14:49 UTC.