This is an archive of the discontinued LLVM Phabricator instance.

[Intrinsic] Signed and Unsigned Saturation Subtraction Intrinsics
ClosedPublic

Authored by leonardchan on Oct 26 2018, 4:26 PM.

Details

Summary

Add an intrinsic that takes 2 integers and perform saturation subtraction 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.

Diff Detail

Repository
rL LLVM

Event Timeline

leonardchan created this revision.Oct 26 2018, 4:26 PM
This revision is now accepted and ready to land.Oct 26 2018, 10:42 PM
bjope added a comment.Oct 27 2018, 1:49 AM

nit: there is a spelling error in the title "Intirnsics"

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
4964 ↗(On Diff #171375)

It should say ">= 0" here.

leonardchan marked an inline comment as done.Oct 29 2018, 9:56 AM
This revision was automatically updated to reflect the committed changes.
leonardchan retitled this revision from [Intrinsic] Signed and Unsigned Saturation Subtraction Intirnsics to [Intrinsic] Signed and Unsigned Saturation Subtraction Intrinsics.Oct 29 2018, 10:02 AM