summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2018-10-16 17:35:41 +0000
committerLeonard Chan <leonardchan@google.com>2018-10-16 17:35:41 +0000
commit699b3b54da2f483228544234e5ed375aa81acd9f (patch)
tree145a229fe95f4d87fbd99ae1ee8fc2e912876d04 /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
parentd3ff1ecfde95549db960aaca4848f7436ca28431 (diff)
downloadbcm5719-llvm-699b3b54da2f483228544234e5ed375aa81acd9f.tar.gz
bcm5719-llvm-699b3b54da2f483228544234e5ed375aa81acd9f.zip
[Intrinsic] Signed Saturation Addition Intrinsic
Add an intrinsic that takes 2 integers and perform saturation addition on them. This is a part of implementing fixed point arithmetic in clang where some of the more complex operations will be implemented as intrinsics. Differential Revision: https://reviews.llvm.org/D53053 llvm-svn: 344629
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
index 58d86e8e52e..2c1a4942f68 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
@@ -386,6 +386,7 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {
case ISD::SMUL_LOHI:
case ISD::UMUL_LOHI:
case ISD::FCANONICALIZE:
+ case ISD::SADDSAT:
Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0));
break;
case ISD::FP_ROUND_INREG:
OpenPOWER on IntegriCloud