[llvm-commits] [llvm] r68996 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Bill Wendling isanbard at gmail.com
Sat Apr 18 14:40:21 PDT 2009


On Apr 18, 2009, at 10:00 AM, Duncan Sands wrote:

> Hi Bill, I noticed that in the DAG combiner part you do:
>
I think you mean "Bob" instead of "Bill". :-)

-bw

>      if (Op.getValueType() != SrcEltVT) {
>        if (Op.getOpcode() == ISD::UNDEF)
>          Op = DAG.getUNDEF(SrcEltVT);
>        else
>          Op = DAG.getNode(ISD::TRUNCATE, BV->getDebugLoc(),  
> SrcEltVT, Op);
>      }
>
> I think this can just be
>
>      if (Op.getValueType() != SrcEltVT)
>        Op = DAG.getNode(ISD::TRUNCATE, BV->getDebugLoc(), SrcEltVT,  
> Op);
>
> because the UNDEF case should be handled automatically by DAG.getNode,
> or if not by the DAG combiner.
>
> Ciao,
>
> Duncan.
> _______________________________________________
> 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