[PATCH] D28883: DAG: Recognize no-signed-zeros-fp-math attribute

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 21:43:46 PST 2017


kzhuravl added inline comments.


================
Comment at: include/llvm/Target/TargetOptions.h:163
+    /// -enable-no-signed-zeros-fp-math is specified on the command line. This
+    /// specifies that optimizations are allowed to treat the sign of a rezo
+    /// argument or result as insignificant.
----------------
rezo->zero.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:632
     // We can't turn -(A-B) into B-A when we honor signed zeros.
-    if (!Options->UnsafeFPMath && !Op.getNode()->getFlags()->hasNoSignedZeros())
+    if (!Options->NoSignedZerosFPMath && !Op.getNode()->getFlags()->hasNoSignedZeros())
       return 0;
----------------
line exceeds 80 chars.


================
Comment at: lib/Target/TargetMachine.cpp:81
   RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math");
+  RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math");
   RESET_OPTION(NoTrappingFPMath, "no-trapping-math");
----------------
This line duplicates the previous one.


https://reviews.llvm.org/D28883





More information about the llvm-commits mailing list