[llvm] [AMDGPU] Improve max3/min3 formation for tree-structured reductions (PR #190734)

Dark Steve via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 22:48:52 PDT 2026


================
@@ -0,0 +1,421 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=GFX9 %s
----------------
PrasoonMishra wrote:

GFX9 check lines for `v_maximum3_tree4_f32` test already serve as a negative subtarget test. As GFX9 does not have `v_maximum3_f32`, `supportsMin3Max3` returns false and the combine does not fire. Hence no maximum3 is formed in the codegen whereas GFX1250 produces `v_maximum3_f32`. I have added f16 positive test, negative double test and bf16 test now.


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


More information about the llvm-commits mailing list