Skip to content

Raise llvm.intr.abs to math.absi - #3001

Open
wsmoses wants to merge 1 commit into
mainfrom
pb/abs-raising
Open

Raise llvm.intr.abs to math.absi#3001
wsmoses wants to merge 1 commit into
mainfrom
pb/abs-raising

Conversation

@wsmoses

@wsmoses wsmoses commented Aug 28, 2026

Copy link
Copy Markdown
Member

mfem's general/array.cpp reaches the raising with llvm.intr.abs (integer abs, from std::abs on kernel indices), which nothing lowered to stablehlo. Raise it to math.absi in the libdevice raising (dropping is_int_min_poison, which only weakens the semantics) and teach arith-raise to lower math.absi to stablehlo.abs.

Part of #2968.

🤖 Generated with Claude Code

https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD

The is_int_min_poison flag has no arith home; drop it. math.absi then
raises generically (and to stablehlo.abs in arith-raise).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant