[llvm-commits] [llvm] r48140 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Evan Cheng
evan.cheng at apple.com
Mon Mar 10 00:59:01 PDT 2008
Author: evancheng
Date: Mon Mar 10 02:59:01 2008
New Revision: 48140
URL: http://llvm.org/viewvc/llvm-project?rev=48140&view=rev
Log:
Doh
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=48140&r1=48139&r2=48140&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Mar 10 02:59:01 2008
@@ -1102,12 +1102,13 @@
}
// 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);
More information about the llvm-commits
mailing list