fallback: translate: call llvm.usub.with.overflow.i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.usub.with.overflow.i32 M
Occurrences:3 in 3 configs, 2 test files, 3 more counted only
Snippet from:xaluo.233df3708d.ll (mutant of xaluo.ll) @usubo.select.i32 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zfinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @usubo.select.i32(i32 signext %v1, i32 signext %v2) {
entry:
  %t = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)
  %obit = extractvalue { i32, i1 } %t, 1
  %B = sdiv i32 %v2, 0
  %ret = select i1 %obit, i32 %v1, i32 %B
  ret i32 %ret
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare { i32, i1 } @llvm.usub.with.overflow.i32(i32, i32) #0

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.usub.with.overflow.i32: '  %t = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 %v1, i32 %v2)' (in function: usubo.select.i32)
warning: Instruction selection used fallback path for usubo.select.i32

Occurrences (3):

InputFunctionConfig
arith-with-overflow.16fc910667.ll (mutant of arith-with-overflow.ll)usub-mtriple=riscv32 -verify-machineinstrs -mattr=+zhinx,+m -O3
arith-with-overflow.1caafa8412.ll (mutant of arith-with-overflow.ll)usub-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx -O3
xaluo.233df3708d.ll (mutant of xaluo.ll)usubo.select.i32-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zfinx -O0

Generated 2026-11-29 14:49 UTC.