[all-commits] [llvm/llvm-project] c50539: AMDGPU: Use minnum instead of maxnum for fmed3 src...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon May 12 11:21:35 PDT 2025


  Branch: refs/heads/users/arsenm/amdgpu/fix-nan-constant-src2-fmed3-fold-minnum-not-maxnum
  Home:   https://github.com/llvm/llvm-project
  Commit: c50539d62fb4d633753fdbad977839205a7ab3ac
      https://github.com/llvm/llvm-project/commit/c50539d62fb4d633753fdbad977839205a7ab3ac
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-05-12 (Mon, 12 May 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/test/Transforms/InstCombine/AMDGPU/fmed3.ll

  Log Message:
  -----------
  AMDGPU: Use minnum instead of maxnum for fmed3 src2-nan fold

By the pseudocode in the ISA manual, if any input is a nan it acts
like min3, which will fold to min2 of the other operands. The other
cases fold to min, I'm not sure how this one was wrong.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list