summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-01-14 11:56:59 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-01-14 11:56:59 +0000
commit3d42815cd85783a815263fd4c0166ddafe37cfd8 (patch)
treebc7776b49066d49807c7cbbfc6a3e7348ae73904 /llvm/lib/CodeGen
parentf77079f892548efa3b34c16233d8779d25d92f58 (diff)
downloadbcm5719-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')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
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!");
OpenPOWER on IntegriCloud