From: Simon Pilgrim Date: Mon, 14 Jan 2019 11:56:59 +0000 (+0000) Subject: [SelectionDAG] Add type sanity assertions for add/sub saturation node creation. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d42815cd85783a815263fd4c0166ddafe37cfd8;p=platform%2Fupstream%2Fllvm.git [SelectionDAG] Add type sanity assertions for add/sub saturation node creation. llvm-svn: 351055 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3cff4c5..23a7b3e 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!");