diff options
author | Bevin Hansson <bevin.hansson@ericsson.com> | 2019-12-16 15:25:52 +0100 |
---|---|---|
committer | Bevin Hansson <bevin.hansson@ericsson.com> | 2020-02-24 10:50:52 +0100 |
commit | 6e561d1c94edc2ecaab7b79f6b3f1a06f515d531 (patch) | |
tree | fd4f8bcd906b9b2de40f93566e8fd1b0a177fa3b /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 8f46269f0c1cc93b080931fd9dfeffc4d364004b (diff) | |
download | llvm-6e561d1c94edc2ecaab7b79f6b3f1a06f515d531.zip llvm-6e561d1c94edc2ecaab7b79f6b3f1a06f515d531.tar.gz llvm-6e561d1c94edc2ecaab7b79f6b3f1a06f515d531.tar.bz2 |
[Intrinsic] Add fixed point saturating division intrinsics.
Summary:
This patch adds intrinsics and ISelDAG nodes for signed
and unsigned fixed-point division:
```
llvm.sdiv.fix.sat.*
llvm.udiv.fix.sat.*
```
These intrinsics perform scaled, saturating division
on two integers or vectors of integers. They are
required for the implementation of the Embedded-C
fixed-point arithmetic in Clang.
Reviewers: bjope, leonardchan, craig.topper
Subscribers: hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71550
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 bd717a8..95c63d0 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -660,7 +660,9 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::UMULFIX, VT, Expand); setOperationAction(ISD::UMULFIXSAT, VT, Expand); setOperationAction(ISD::SDIVFIX, VT, Expand); + setOperationAction(ISD::SDIVFIXSAT, VT, Expand); setOperationAction(ISD::UDIVFIX, VT, Expand); + setOperationAction(ISD::UDIVFIXSAT, VT, Expand); // Overflow operations default to expand setOperationAction(ISD::SADDO, VT, Expand); |