The issue here is that your instrinsics signature does not match LLVMs LLVM Language Reference Manual — LLVM 20.0.0git documentation
As you can see
declare i32 @llvm.abs.i32(i32 <src>, i1 <is_int_min_poison>)
it takes two arguments instead of just one, so to call it you must do a similar thing.
julia> abs_i64(x) = ccall("llvm.abs.i64", llvmcall, Int64, (Int64, Bool), x, true)
abs_i64 (generic function with 1 method)
julia> abs_i64(-1)
1
julia> @code_llvm abs_i64(-1)
; @ REPL[1]:1 within `abs_i64`
define i64 @julia_abs_i64_125(i64 signext %0) #0 {
top:
%1 = call i64 @llvm.abs.i64(i64 %0, i1 zeroext true)
ret i64 %1
}
Always check the LangRef before using the intrinsic