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

Bill Wendling wendling at apple.com
Tue Feb 1 11:16:10 PST 2011


On Jan 26, 2011, at 6:39 PM, Matt Beaumont-Gay wrote:

> Author: matthewbg
> Date: Wed Jan 26 20:39:27 2011
> New Revision: 124350
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=124350&view=rev
> Log:
> Try harder to not have unused variables.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=124350&r1=124349&r2=124350&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Jan 26 20:39:27 2011
> @@ -2875,6 +2875,7 @@
>              "Extract subvector must be from larger vector to smaller vector!");
> 
>       if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
> +        (void)CSD;

Why not use "isa<>" here and "cast<>" in the assert?

-bw

>         assert((VT.getVectorNumElements() + CSD->getZExtValue()
>                 <= N1.getValueType().getVectorNumElements())
>                && "Extract subvector overflow!");
> @@ -3093,6 +3094,7 @@
>       assert(N2.getValueType().getSimpleVT() <= N1.getValueType().getSimpleVT() &&
>              "Insert subvector must be from smaller vector to larger vector!");
>       if (ConstantSDNode *CSD = dyn_cast<ConstantSDNode>(Index.getNode())) {
> +        (void)CSD;
>         assert((N2.getValueType().getVectorNumElements() + CSD->getZExtValue()
>                 <= VT.getVectorNumElements())
>                && "Insert subvector overflow!");
> 
> 
> _______________________________________________
> 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