[llvm] [AMDGPU] Adjust amdgpu fmax/fmin legalization for DAG (PR #203150)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 05:03:34 PDT 2026
================
@@ -8703,16 +8758,21 @@ SDValue SITargetLowering::lowerFMINNUM_FMAXNUM(SDValue Op,
const MachineFunction &MF = DAG.getMachineFunction();
const SIMachineFunctionInfo *Info = MF.getInfo<SIMachineFunctionInfo>();
bool IsIEEEMode = Info->getMode().IEEE;
+ bool IsDivergent = Op.getNode()->isDivergent();
+ bool NeedExpand = (IsDivergent && !Subtarget->hasIEEEMinimumMaximumInsts()) ||
+ (!IsDivergent && !Subtarget->hasSALUMinimumMaximumInsts());
----------------
arsenm wrote:
Shouldn't need to reconsider the features here. If it was legal it wouldn't reach here
https://github.com/llvm/llvm-project/pull/203150
More information about the llvm-commits
mailing list