[llvm-commits] [llvm] r164178 - in /llvm/trunk: lib/Transforms/Scalar/SROA.cpp test/Transforms/SROA/basictest.ll

Chandler Carruth chandlerc at google.com
Mon Nov 5 02:20:29 PST 2012


On Wed, Sep 19, 2012 at 6:33 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Chandler,
>
>
>> Fix the last crasher I've gotten a reproduction for in SROA. This one
>> from the dragonegg build bots when we turned on the full version of the
>> pass. Included a much reduced test case for this pesky bug, despite
>> bugpoint's uncooperative behavior.
>>
>> Also, I audited all the similar code I could find and didn't spot any
>> other cases where this mistake cropped up.
>>
>> Modified:
>>      llvm/trunk/lib/Transforms/Scalar/SROA.cpp
>>      llvm/trunk/test/Transforms/SROA/basictest.ll
>>
>> Modified: llvm/trunk/lib/Transforms/Scalar/SROA.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SROA.cpp?rev=164178&r1=164177&r2=164178&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/Scalar/SROA.cpp (original)
>> +++ llvm/trunk/lib/Transforms/Scalar/SROA.cpp Tue Sep 18 17:37:19 2012
>> @@ -1487,6 +1487,8 @@
>>       return 0;
>>
>>     Type *ElementTy = Ty->getElementType();
>> +  if (!ElementTy->isSized())
>> +    return 0; // We can't GEP through an unsized element.
>
>
> actually you can, if all the indices are zero.

Saw this in my commit mail backlog...

Is there a concern with the comment, or the functionality here?



More information about the llvm-commits mailing list