[llvm] [AMDGPU] Legalize fminimum and fmaximum for gfx950 (PR #138971)
Mariusz Sikora via llvm-commits
llvm-commits at lists.llvm.org
Thu May 8 03:01:19 PDT 2025
================
@@ -861,6 +861,22 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
if (Subtarget->hasIEEEMinMax()) {
setOperationAction({ISD::FMAXIMUM, ISD::FMINIMUM},
{MVT::f16, MVT::f32, MVT::f64, MVT::v2f16}, Legal);
+ } else {
+ // FIXME: For nnan fmaximum, emit the fmaximum3 instead of fmaxnum
+ if (Subtarget->hasMinimum3Maximum3F32())
+ setOperationAction({ISD::FMAXIMUM, ISD::FMINIMUM}, MVT::f32, Legal);
+
+ if (Subtarget->hasMinimum3Maximum3PKF16()) {
----------------
mariusz-sikora-at-amd wrote:
The same code is added in L888 which is under else of `if (Subtarget->hasVOP3PInsts())`. Probably we should remove code from L888 and L892
https://github.com/llvm/llvm-project/pull/138971
More information about the llvm-commits
mailing list