[PATCH] D91716: AMDGPU/GlobalISel: Calculate isKnownNeverNaN for fminnum and fmaxnum

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 08:32:10 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:494-500
+    // Known NaN assumptions for G_FMINNUM and G_FMAXNUM might be affected by
+    // target specific options and lowering actions. False by default.
+    case TargetOpcode::G_FMINNUM:
+    case TargetOpcode::G_FMAXNUM: {
+      const TargetLowering *TLI = MF->getSubtarget().getTargetLowering();
+      return TLI->isKnownNeverNaNForMI(Val, MRI, SNaN);
+    }
----------------
Generic opcodes should not have target dependent semantics like this, especially since these already have semantics inherited from the IR/C fmin/fmax definition. They return the non-nan argument regardless of snan or not


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91716/new/

https://reviews.llvm.org/D91716



More information about the llvm-commits mailing list