diff options
| author | Leonard Chan <leonardchan@google.com> | 2018-10-29 16:54:37 +0000 |
|---|---|---|
| committer | Leonard Chan <leonardchan@google.com> | 2018-10-29 16:54:37 +0000 |
| commit | 905abe5b5d8bfb0e7819d9215a4b52c9f3296414 (patch) | |
| tree | ca1adf55a814679c655ec95d0294f51454ab7cfc /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
| parent | 71c989ae1f77b31fb4ee50d9f9510a6f839e381b (diff) | |
| download | bcm5719-llvm-905abe5b5d8bfb0e7819d9215a4b52c9f3296414.tar.gz bcm5719-llvm-905abe5b5d8bfb0e7819d9215a4b52c9f3296414.zip | |
[Intrinsic] Signed and Unsigned Saturation Subtraction Intirnsics
Add an intrinsic that takes 2 integers and perform saturation subtraction 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/D53783
llvm-svn: 345512
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 715112edc17..30887e2d5f8 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -612,6 +612,8 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::ABS, VT, Expand); setOperationAction(ISD::SADDSAT, VT, Expand); setOperationAction(ISD::UADDSAT, VT, Expand); + setOperationAction(ISD::SSUBSAT, VT, Expand); + setOperationAction(ISD::USUBSAT, VT, Expand); // Overflow operations default to expand setOperationAction(ISD::SADDO, VT, Expand); |

