diff options
author | Leonard Chan <leonardchan@google.com> | 2018-10-22 23:08:40 +0000 |
---|---|---|
committer | Leonard Chan <leonardchan@google.com> | 2018-10-22 23:08:40 +0000 |
commit | 0acfc6be384ad769dd3a72d771aa44e5ba6749ad (patch) | |
tree | 751f33e1590511cc499c388d07390c1dd5dab76f /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | a0beeffeed3d24cf65ec165141926f7715380eb2 (diff) | |
download | llvm-0acfc6be384ad769dd3a72d771aa44e5ba6749ad.zip llvm-0acfc6be384ad769dd3a72d771aa44e5ba6749ad.tar.gz llvm-0acfc6be384ad769dd3a72d771aa44e5ba6749ad.tar.bz2 |
[Intrinsic] Unigned Saturation Addition Intrinsic
Add an intrinsic that takes 2 integers and perform unsigned 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/D53340
llvm-svn: 344971
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index ddd5fc1..09c5b52 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -611,6 +611,7 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::UMAX, VT, Expand); setOperationAction(ISD::ABS, VT, Expand); setOperationAction(ISD::SADDSAT, VT, Expand); + setOperationAction(ISD::UADDSAT, VT, Expand); // Overflow operations default to expand setOperationAction(ISD::SADDO, VT, Expand); |