[llvm] r242503 - AArch64: add comment missed out from earlier patch.

Tim Northover tnorthover at apple.com
Thu Jul 16 20:31:51 PDT 2015


Author: tnorthover
Date: Thu Jul 16 22:31:50 2015
New Revision: 242503

URL: http://llvm.org/viewvc/llvm-project?rev=242503&view=rev
Log:
AArch64: add comment missed out from earlier patch.

Helps explain some of the background behind this bit of code.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp?rev=242503&r1=242502&r2=242503&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp Thu Jul 16 22:31:50 2015
@@ -2062,6 +2062,10 @@ SDNode *AArch64DAGToDAGISel::SelectLIBM(
   SmallVector<SDValue, 2> Ops;
   Ops.push_back(In);
 
+  // C11 leaves it implementation-defined whether these operations trigger an
+  // inexact exception. IEEE says they don't.  Unfortunately, Darwin decided
+  // they do so we sometimes have to insert a special instruction just to set
+  // the right bit in FPSR.
   if (Subtarget->isTargetDarwin() && !TM.Options.UnsafeFPMath) {
     SDNode *FRINTX = CurDAG->getMachineNode(FRINTXOpc, dl, VT, MVT::Glue, In);
     Ops.push_back(SDValue(FRINTX, 1));





More information about the llvm-commits mailing list