diff options
author | Bevin Hansson <bevin.hansson@ericsson.com> | 2020-01-08 15:05:03 +0100 |
---|---|---|
committer | Mikael Holmen <mikael.holmen@ericsson.com> | 2020-01-08 15:17:46 +0100 |
commit | 8e2b44f7e0641d3776021163ee6a77089cca9cdc (patch) | |
tree | 205b4886dc26e7093471966d7bb6930e15ef8e0b /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | b2c2fe72197267af90b4b6a187ab6163f806ce00 (diff) | |
download | bcm5719-llvm-8e2b44f7e0641d3776021163ee6a77089cca9cdc.tar.gz bcm5719-llvm-8e2b44f7e0641d3776021163ee6a77089cca9cdc.zip |
[Intrinsic] Add fixed point division intrinsics.
Summary:
This patch adds intrinsics and ISelDAG nodes for
signed and unsigned fixed-point division:
llvm.sdiv.fix.*
llvm.udiv.fix.*
These intrinsics perform scaled division on two
integers or vectors of integers. They are required
for the implementation of the Embedded-C fixed-point
arithmetic in Clang.
Patch by: ebevhan
Reviewers: bjope, leonardchan, efriedma, craig.topper
Reviewed By: craig.topper
Subscribers: Ka-Ka, ilya, hiraditya, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70007
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 9198ae07c00..0fa10c11375 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -663,6 +663,8 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::SMULFIXSAT, VT, Expand); setOperationAction(ISD::UMULFIX, VT, Expand); setOperationAction(ISD::UMULFIXSAT, VT, Expand); + setOperationAction(ISD::SDIVFIX, VT, Expand); + setOperationAction(ISD::UDIVFIX, VT, Expand); // Overflow operations default to expand setOperationAction(ISD::SADDO, VT, Expand); |