Hi all, I'm hitting the following assert in PredicateSimplifier.cpp:961 : 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080709/71c63fdb/attachment.html>
On Wed, Jul 9, 2008 at 2:30 AM, Nicolas Capens <nicolas at capens.net> wrote:> I'm hitting the following assert in PredicateSimplifier.cpp:961 :An assert in PredicateSimplifier is probably a bug in the -predsimplify pass; it's still considered experimental.> The code I'm generating is fairly long but if necessary I could try to boil > it down…See http://llvm.org/docs/HowToSubmitABug.html; there are automated tools to boil down large testcases. -Eli
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. -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 -- http://nondot.org/sabre/ http://llvm.org/
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 >