- Make lowering of "add with overflow" customizable by back-ends.
- Mark "add with overflow" as having a custom lowering for X86. Give it a null
  lowering representation for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59971 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index f3948f9..41d4425 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -4096,9 +4096,8 @@
   case Intrinsic::sadd_with_overflow: {
     SDValue Op1 = getValue(I.getOperand(1));
     SDValue Op2 = getValue(I.getOperand(2));
-    MVT Ty = Op1.getValueType();
 
-    MVT ValueVTs[] = { Ty, MVT::i1 };
+    MVT ValueVTs[] = { Op1.getValueType(), MVT::i1 };
     SDValue Ops[] = { Op1, Op2 };
 
     SDValue Result =