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

Chris Lattner clattner at apple.com
Tue Mar 11 19:38:56 PDT 2008


On Mar 11, 2008, at 7:05 PM, Evan Cheng wrote:

> 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.

You're checking for buildvector of zero again.  Is this right?

-Chris

>
>
> 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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list