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

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: call llvm.sadd.with.overflow.i32 M
Occurrences:5 in 4 configs, 1 test files, 7 more counted only
Snippet from:xaluo.7852489cc5.ll (mutant of xaluo.ll) @saddo2.i32 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zhinx -O0
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define zeroext i1 @saddo2.i32(i32 signext %v1, ptr %res) {
entry:
  %t = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %v1, i32 4)
  %val = extractvalue { i32, i1 } %t, 0
  store i32 %val, ptr %res, align 4
  %C = icmp ult i8 1, -128
  ret i1 %C
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare { i32, i1 } @llvm.sadd.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,+zhinx -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zhinx -O0 -global-isel=0 snippet.ll -o -

Local llc output:

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

Occurrences (5):

InputFunctionConfig
xaluo.24c2599d9a.ll (mutant of xaluo.ll)saddo.br.i32-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zdinx -O1
xaluo.7852489cc5.ll (mutant of xaluo.ll)saddo2.i32-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zba,+zhinx -O0
xaluo.9cd90cee41.ll (mutant of xaluo.ll)saddo.br.i32-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zicond,+zfinx -O0
xaluo.f109c0ef52.ll (mutant of xaluo.ll)saddo1.i32-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O3
xaluo.f109c0ef52.ll (mutant of xaluo.ll)saddo.br.i32-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O3

Generated 2026-11-29 14:49 UTC.