[PATCH] D87115: [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding to negative infinity

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 03:32:31 PDT 2020


uweigand added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6468
+  // infinity. It produces -0.0 so disable under strictfp.
+  if (Node->isStrictFPOpcode())
+    return false;
----------------
Why is this testing isStrictFPOpcode?   The only difference between strict and non-strict operations is that the former respect exceptions (and current rounding mode, if applicable).  The behavior of signed zeros is not affected by those; even a non-strict UINT_TO_FP should never produce a negative zero (unless the NoSignedZero flags is set, I guess).


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

https://reviews.llvm.org/D87115



More information about the llvm-commits mailing list