diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-01-14 11:56:59 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-01-14 11:56:59 +0000 |
commit | 3d42815cd85783a815263fd4c0166ddafe37cfd8 (patch) | |
tree | bc7776b49066d49807c7cbbfc6a3e7348ae73904 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | f77079f892548efa3b34c16233d8779d25d92f58 (diff) | |
download | bcm5719-llvm-3d42815cd85783a815263fd4c0166ddafe37cfd8.tar.gz bcm5719-llvm-3d42815cd85783a815263fd4c0166ddafe37cfd8.zip |
[SelectionDAG] Add type sanity assertions for add/sub saturation node creation.
llvm-svn: 351055
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3cff4c5c0fc..23a7b3ece82 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -4827,6 +4827,10 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, case ISD::SMAX: case ISD::UMIN: case ISD::UMAX: + case ISD::SADDSAT: + case ISD::SSUBSAT: + case ISD::UADDSAT: + case ISD::USUBSAT: assert(VT.isInteger() && "This operator does not apply to FP types!"); assert(N1.getValueType() == N2.getValueType() && N1.getValueType() == VT && "Binary operator types must match!"); |