[llvm] [AMDGPU] [DO NOT MERGE] Nonsuccessful Attempt At Using SelectionDAG Hooks for abs i8/i16 (PR #167064)

Patrick Simmons via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 11 12:56:57 PST 2025


linuxrocks123 wrote:

Hi @arsenm, in this PR, I have redundantly used every target-specific hook suggested by you or @RKSimon to demonstrate that none of them are functioning for our intended purpose.  If I am using one of those hooks incorrectly, a review comment explaining how that hook could be made to work for `i8` would allow me to change the implementation of https://github.com/llvm/llvm-project/pull/165626 back to using the appropriate hook.  If I'm not, then we know the current implementation approach used by https://github.com/llvm/llvm-project/pull/165626 is optimal.

Thank you for your other comments, but, since this PR is not intended for merge, it does not need any review except to verify that I have not missed a way to make one of these hooks work.  For that reason, I have resolved all existing conversations to ensure that I don't miss a comment from you or @RKSimon explaining how a hook could be made to function.

Regarding `i8` and `i16` versus just `i16`, I don't care whether we fix `abs` in one PR or two, but, even if we only do `i16` in https://github.com/llvm/llvm-project/pull/165626, the approach used there should be an approach that will work for both types in order to avoid unnecessary churn later on.  Thanks again for your help.

https://github.com/llvm/llvm-project/pull/167064


More information about the llvm-commits mailing list