[llvm] r182656 - LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases.
Bill Wendling
isanbard at gmail.com
Fri May 24 11:25:01 PDT 2013
Sorry. 3.3 is closed except for serious regressions from 3.2.
-bw
On May 24, 2013, at 11:11 AM, Nadav Rotem <nrotem at apple.com> wrote:
> LGTM.
>
> On May 24, 2013, at 11:09 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>
>>
>> On 24.05.2013, at 20:05, Benjamin Kramer <benny.kra at googlemail.com> wrote:
>>
>>> Author: d0k
>>> Date: Fri May 24 13:05:35 2013
>>> New Revision: 182656
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=182656&view=rev
>>> Log:
>>> LoopVectorize: LoopSimplify can't canonicalize loops with an indirectbr in it, don't assert on those cases.
>>>
>>> Fixes PR16139.
>>
>> This unbreaks compiling erlang at -O3, making it a good candidate for 3.3.
>>
>> - Ben
>>
>>>
>>> Modified:
>>> llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
>>> llvm/trunk/test/Transforms/LoopVectorize/lcssa-crash.ll
>>>
>>> Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=182656&r1=182655&r2=182656&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
>>> +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Fri May 24 13:05:35 2013
>>> @@ -2428,7 +2428,10 @@ bool LoopVectorizationLegality::canVecto
>>> }
>>>
>>> bool LoopVectorizationLegality::canVectorize() {
>>> - assert(TheLoop->getLoopPreheader() && "No preheader!!");
>>> + // We must have a loop in canonical form. Loops with indirectbr in them cannot
>>> + // be canonicalized.
>>> + if (!TheLoop->getLoopPreheader())
>>> + return false;
>>>
>>> // We can only vectorize innermost loops.
>>> if (TheLoop->getSubLoopsVector().size())
>>>
>>> Modified: llvm/trunk/test/Transforms/LoopVectorize/lcssa-crash.ll
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/lcssa-crash.ll?rev=182656&r1=182655&r2=182656&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/Transforms/LoopVectorize/lcssa-crash.ll (original)
>>> +++ llvm/trunk/test/Transforms/LoopVectorize/lcssa-crash.ll Fri May 24 13:05:35 2013
>>> @@ -27,3 +27,14 @@ for.end.i.i.i:
>>> unreachable
>>> }
>>>
>>> +; PR16139
>>> +define void @test2(i8* %x) {
>>> +entry:
>>> + indirectbr i8* %x, [ label %L0, label %L1 ]
>>> +
>>> +L0:
>>> + br label %L0
>>> +
>>> +L1:
>>> + ret void
>>> +}
>>>
>>>
>>> _______________________________________________
>>> 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