diff options
author | Leonard Chan <leonardchan@google.com> | 2019-02-04 17:18:11 +0000 |
---|---|---|
committer | Leonard Chan <leonardchan@google.com> | 2019-02-04 17:18:11 +0000 |
commit | 68d428e57894492a2ba9a650874b7f3a029ed93b (patch) | |
tree | c831b029561adb8be28b57476d3f6c25d5714ce2 /llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
parent | 73158e72012c88e8e9a6b2bc9f9d36868e43d8e7 (diff) | |
download | bcm5719-llvm-68d428e57894492a2ba9a650874b7f3a029ed93b.tar.gz bcm5719-llvm-68d428e57894492a2ba9a650874b7f3a029ed93b.zip |
[Intrinsic] Unsigned Fixed Point Multiplication Intrinsic
Add an intrinsic that takes 2 unsigned integers with the scale of them
provided as the third argument and performs fixed point multiplication 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/D55625
llvm-svn: 353059
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index 6ff288c8976..5d080e06d75 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -425,7 +425,8 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) { case ISD::USUBSAT: Action = TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)); break; - case ISD::SMULFIX: { + case ISD::SMULFIX: + case ISD::UMULFIX: { unsigned Scale = Node->getConstantOperandVal(2); Action = TLI.getFixedPointOperationAction(Node->getOpcode(), Node->getValueType(0), Scale); @@ -784,6 +785,7 @@ SDValue VectorLegalizer::Expand(SDValue Op) { case ISD::SADDSAT: return ExpandAddSubSat(Op); case ISD::SMULFIX: + case ISD::UMULFIX: return ExpandFixedPointMul(Op); case ISD::STRICT_FADD: case ISD::STRICT_FSUB: |