[PATCH] D57836: [Intrinsic] Unsigned Fixed Point Saturation Multiplication Intrinsic

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 12:26:58 PST 2019


leonardchan created this revision.
leonardchan added reviewers: RKSimon, craig.topper, bevinh, bjope.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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. 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.


Repository:
  rL LLVM

https://reviews.llvm.org/D57836

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/Target/TargetSelectionDAG.td
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/CodeGen/X86/umul_fix_sat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57836.185613.patch
Type: text/x-patch
Size: 40741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190206/88625d25/attachment.bin>


More information about the llvm-commits mailing list