summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-07-17 03:31:50 +0000
committerTim Northover <tnorthover@apple.com>2015-07-17 03:31:50 +0000
commita5740e08744403031f5d2a0b4baa614a4d6bfad9 (patch)
tree3d3be72f37e0beafd03d38f783cc1995fd76ee07 /llvm
parent8101f570f83cf7643b64d38d71dfe00cea3ac6ee (diff)
downloadbcm5719-llvm-a5740e08744403031f5d2a0b4baa614a4d6bfad9.tar.gz
bcm5719-llvm-a5740e08744403031f5d2a0b4baa614a4d6bfad9.zip
AArch64: add comment missed out from earlier patch.
Helps explain some of the background behind this bit of code. llvm-svn: 242503
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
index cf33782365b..1a1b58bd26e 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<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));
OpenPOWER on IntegriCloud