[PATCH] D87220: [PowerPC] Fix STRICT_FRINT/STRICT_FNEARBYINT lowering

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 07:01:09 PDT 2020


uweigand accepted this revision.
uweigand added a comment.
This revision is now accepted and ready to land.

Makes sense to me.   As an aside, this code:

  // The nearbyint variants are not allowed to raise the inexact exception
  // so we can only code-gen them with unsafe math.
  if (TM.Options.UnsafeFPMath) {
    setOperationAction(ISD::FNEARBYINT, MVT::f64, Legal);
    setOperationAction(ISD::FNEARBYINT, MVT::f32, Legal);
  }

is probably overly strict: FNEARBYINT (as opposed to STRICT_FNEARBYINT) is defined to ignore exceptions, whether or not we have UnsafeFPMath or not, so this can probably be enabled unconditionally.

But that can be done independently of this patch.  LGTM.


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

https://reviews.llvm.org/D87220



More information about the llvm-commits mailing list