From: Tim Northover Date: Fri, 17 Jul 2015 03:31:50 +0000 (+0000) Subject: AArch64: add comment missed out from earlier patch. X-Git-Tag: studio-1.4~2250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5740e08744403031f5d2a0b4baa614a4d6bfad9;p=platform%2Fupstream%2Fllvm.git AArch64: add comment missed out from earlier patch. Helps explain some of the background behind this bit of code. llvm-svn: 242503 --- diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp index cf33782..1a1b58b 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -2062,6 +2062,10 @@ SDNode *AArch64DAGToDAGISel::SelectLIBM(SDNode *N) { SmallVector 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));