[LLVMdev] Refusing to store single element
Nick Lewycky
nicholas at mxc.ca
Wed Jul 9 19:59:26 PDT 2008
Chris Lattner wrote:
> On Wed, 9 Jul 2008, Nicolas Capens wrote:
>> I'm hitting the following assert in PredicateSimplifier.cpp:961 :
>
> Hi Nicolas,
>
> The predsimplify pass is experimental at best, and should be removed at
> worst. I don't think it is going to be futher developed, so I'd suggest
> staying away from it.
I believe it's on by default for VMKit. Whether it should be is a
different matter altogether.
The assert means that predsimplify has encountered what should be an
impossible state; a value range has collapsed to a single constant
number, but instead of replacing the Value with the new constant, it's
just storing the fact that it's equal to said constant without
performing any replacement. A missed optimization, really.
If you can simplify it with "bugpoint -predsimplify yourcode.bc" then I
can take a look at what's wrong and fix it.
Nick
> -Chris
>
>>
>>
>> assert(!CR.isSingleElement() && "Refusing to store single element.");
>>
>>
>>
>> If I ignore it the generated code appears correct so I'm not sure what
>> this
>> assert is supposed to be for. Am I doing something wrong on my end or is
>> this a superfluous assert or it really indicates an LLVM bug?
>>
>>
>>
>> The code I'm generating is fairly long but if necessary I could try to
>> boil
>> it down.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Nicolas
>>
>>
>
> -Chris
>
More information about the llvm-dev
mailing list