fallback: translate: call llvm.abs.i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.abs.i32 M
Occurrences:4 in 4 configs, 3 test files, 12 more counted only
Snippet from:neg-abs.b9329b1a42.ll (mutant of neg-abs.ll) @neg_abs32_multiuse via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @neg_abs32_multiuse(i32 %x, ptr %y) {
  %abs = tail call i32 @llvm.abs.i32(i32 %x, i1 true)
  store i32 %abs, ptr %y, align 4
  %B = and i32 %x, %x
  ret i32 %B
}

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

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.abs.i32: '  %abs = tail call i32 @llvm.abs.i32(i32 %x, i1 true)' (in function: neg_abs32_multiuse)
warning: Instruction selection used fallback path for neg_abs32_multiuse

Occurrences (4):

InputFunctionConfig
iabs.bb400966c3.ll (mutant of iabs.ll)abs32-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zfinx -O2 -code-model=small
iabs.c06c7d73bd.ll (mutant of iabs.ll)abs32-mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O0
iabs.f601e969d9.ll (mutant of iabs.ll)abs32-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O3
neg-abs.b9329b1a42.ll (mutant of neg-abs.ll)neg_abs32_multiuse-mtriple=riscv32 -verify-machineinstrs -mattr=+zdinx -O0

Generated 2026-11-29 14:49 UTC.