fallback: translate: call llvm.abs.i32

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: call llvm.abs.i32 M
Occurrences:3 in 3 configs, 3 test files, 5 more counted only
Snippet from:iabs.030a5cfd08.ll (mutant of iabs.ll) @abs32 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O1
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @abs32(i32 %x) {
  %abs = tail call i32 @llvm.abs.i32(i32 %x, i1 true)
  %B = sub i32 %abs, %abs
  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=riscv64 -verify-machineinstrs -mattr=+zhinx -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O1 -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: abs32)
warning: Instruction selection used fallback path for abs32

Occurrences (3):

InputFunctionConfig
iabs.030a5cfd08.ll (mutant of iabs.ll)abs32-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O1
iabs.1e0beb3af2.ll (mutant of iabs.ll)abs32-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zicsr,+zfinx -O0
neg-abs.f52a184131.ll (mutant of neg-abs.ll)neg_abs32-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O2

Generated 2026-11-29 14:49 UTC.