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.
Paths
| Differential D53783
[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
Event TimelineThis revision is now accepted and ready to land.Oct 26 2018, 10:42 PM Comment Actions nit: there is a spelling error in the title "Intirnsics"
Closed by commit rL345512: [Intrinsic] Signed and Unsigned Saturation Subtraction Intirnsics (authored by leonardchan). · Explain WhyOct 29 2018, 9:57 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 spatel mentioned this in D96904: [IR] restrict vector reduction intrinsic types.Feb 19 2021, 9:23 AM
Revision Contents
Diff 171375 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/LegalizeTypes.h
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/ssub_sat.ll
llvm/test/CodeGen/X86/usub_sat.ll
|
It should say ">= 0" here.