[llvm-commits] [llvm] r48274 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Evan Cheng evan.cheng at apple.com
Tue Mar 11 19:05:05 PDT 2008


Author: evancheng
Date: Tue Mar 11 21:05:05 2008
New Revision: 48274

URL: http://llvm.org/viewvc/llvm-project?rev=48274&view=rev
Log:
Total brain cramp.

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=48274&r1=48273&r2=48274&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Mar 11 21:05:05 2008
@@ -1103,7 +1103,7 @@
   
   // fold (sub x, x) -> 0
   if (N0 == N1) {
-    if (!AfterLegalize || !MVT::isVector(VT))
+    if (AfterLegalize && ISD::isBuildVectorAllZeros(N0.Val))
       // For example, zero vectors might be normalized to a particular vector
       // type to ensure they are CSE'd. Avoid issuing zero vector nodes of
       // *unexpected* type after legalization.





More information about the llvm-commits mailing list