aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.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/TargetLoweringBase.cpp
parentd3ff1ecfde95549db960aaca4848f7436ca28431 (diff)
downloadllvm-699b3b54da2f483228544234e5ed375aa81acd9f.zip
llvm-699b3b54da2f483228544234e5ed375aa81acd9f.tar.gz
llvm-699b3b54da2f483228544234e5ed375aa81acd9f.tar.bz2
[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/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index b785fdc..03a29a3 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -608,6 +608,7 @@ void TargetLoweringBase::initActions() {
setOperationAction(ISD::UMIN, VT, Expand);
setOperationAction(ISD::UMAX, VT, Expand);
setOperationAction(ISD::ABS, VT, Expand);
+ setOperationAction(ISD::SADDSAT, VT, Expand);
// Overflow operations default to expand
setOperationAction(ISD::SADDO, VT, Expand);