From: Evan Cheng Date: Mon, 10 Mar 2008 07:59:01 +0000 (+0000) Subject: Doh X-Git-Tag: android-x86-6.0-r1~1003^2~29651 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ff247d2ed41dac50d99c5ff534b12f33bb57310a;p=android-x86%2Fexternal-llvm.git Doh git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48140 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 1b00855a671..3a8c46815c8 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1102,12 +1102,13 @@ SDOperand DAGCombiner::visitSUB(SDNode *N) { } // fold (sub x, x) -> 0 - if (N0 == N1) + if (N0 == N1) { if (ISD::isBuildVectorAllZeros(N0.Val)) // Zero vectors might be normalized to a particular vector type to ensure // they are CSE'd. Return it as it is. return N0; return DAG.getConstant(0, N->getValueType(0)); + } // fold (sub c1, c2) -> c1-c2 if (N0C && N1C) return DAG.getNode(ISD::SUB, VT, N0, N1);