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

Akira Hatanaka ahatanak at gmail.com
Thu Mar 28 12:36:14 PDT 2013


You are right. It doesn't need -O3 to trigger the code.

Fixed in r178278.

On Thu, Mar 28, 2013 at 7:35 AM, Tobias Grosser <tobias at grosser.es> wrote:

> 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<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<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
>
> ______________________________**_________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130328/33c1ad11/attachment.html>


More information about the llvm-commits mailing list