[llvm] r178208 - Check if Type is a vector before calling function Type::getVectorNumElements.

Tobias Grosser tobias at grosser.es
Thu Mar 28 07:35:17 PDT 2013


On 03/28/2013 02:28 AM, Akira Hatanaka wrote:
> Author: ahatanak
> Date: Wed Mar 27 20:28:02 2013
> New Revision: 178208
>
> URL: http://llvm.org/viewvc/llvm-project?rev=178208&view=rev
> Log:
> Check if Type is a vector before calling function Type::getVectorNumElements.
> Added: llvm/trunk/test/Transforms/InstCombine/vector-type.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vector-type.ll?rev=178208&view=auto
> ==============================================================================
> --- llvm/trunk/test/Transforms/InstCombine/vector-type.ll (added)
> +++ llvm/trunk/test/Transforms/InstCombine/vector-type.ll Wed Mar 27 20:28:02 2013
> @@ -0,0 +1,15 @@
> +;  The code in InstCombiner::FoldSelectOpOp was calling
> +;  Type::getVectorNumElements without checking first if the type was a vector.
> +
> +; RUN: opt < %s -instcombine -S -O3

Do we really want to run all '-03' passes here? I would prefer to reduce 
this to the minimal sets of passes necessary.

Tobi



More information about the llvm-commits mailing list