[llvm] [AMDGPU] Improved Lowering of abs(i16) and -abs(i16) (PR #165626)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 31 21:14:06 PDT 2025


================
@@ -0,0 +1,26 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=amdgcn-- -mcpu=gfx900 < %s | FileCheck %s
----------------
arsenm wrote:

I would hope we wouldn't need a new test for this. It looks like the abs tests could use some gardening. test/CodeGen/AMDGPU/GlobalISel/llvm.abs.ll looks reasonably comprehensive; can you start by precommitting moving that up to the main directory, and adding dag run lines?  It then should gain the negated abs cases 

(I also noticed the test is minorly broken, fixed by #165965)

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


More information about the llvm-commits mailing list