diff options
| author | Leonard Chan <leonardchan@google.com> | 2019-05-21 19:17:19 +0000 |
|---|---|---|
| committer | Leonard Chan <leonardchan@google.com> | 2019-05-21 19:17:19 +0000 |
| commit | 0bada7ce6c12d904495bf504c9f56aa6583186e6 (patch) | |
| tree | 2fa73c1df5121f70491f578d3003ea9e68385e1b /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
| parent | ed6df47bae6267adbf460848c2261a52de494fbf (diff) | |
| download | bcm5719-llvm-0bada7ce6c12d904495bf504c9f56aa6583186e6.tar.gz bcm5719-llvm-0bada7ce6c12d904495bf504c9f56aa6583186e6.zip | |
[Intrinsic] Signed Fixed Point Saturation Multiplication Intrinsic
Add an intrinsic that takes 2 signed integers with the scale of them provided
as the third argument and performs fixed point multiplication on them. The
result is saturated and clamped between the largest and smallest representable
values of the first 2 operands.
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/D55720
llvm-svn: 361289
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index ad2e398dff1..f77ccd994da 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -438,6 +438,7 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) { Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); break; case ISD::SMULFIX: + case ISD::SMULFIXSAT: case ISD::UMULFIX: { unsigned Scale = Node->getConstantOperandVal(2); Action = TLI.getFixedPointOperationAction(Node->getOpcode(), |

