[llvm-commits] [llvm] r71535 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/Target/ lib/Transforms/Scalar/ test/CodeGen/X86/ test/Transforms/IndVarSimplify/ test/Transforms/LoopStrengthReduce/

Dan Gohman gohman at apple.com
Wed May 13 11:11:36 PDT 2009

On May 12, 2009, at 2:05 AM, Duncan Sands wrote:

> Hi Dan, thank you for doing this!
>> Now that IndVarSimplify is being more aggressive, it occasionally  
>> runs
>> into the problem where ScalarEvolutionExpander's code for avoiding
>> duplicate expansions makes it difficult to ensure that all expanded
>> instructions dominate all the instructions that will use them. As a
>> temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs  
>> function
>> to fix up instructions inserted by SCEVExpander. Fortunately, this  
>> code
>> is contained, and can be easily removed once a more comprehensive
>> solution is available.
> Unfortunately this causes several Ada testsuite failures.  I've  
> attached
> a reduced testcase (all the failures seem be to for the same reason).
> $ opt -indvars c35503g.bc -disable-output
> opt: llvm/include/llvm/ADT/ilist.h:197: typename  
> bidirectional_iterator<NodeTy, int>::reference  
> llvm::ilist_iterator<NodeTy>::operator*() const [with NodeTy =  
> llvm::Instruction]: Assertion `Traits::getNext(NodePtr) != 0 &&  
> "Dereferencing end()!"' failed.
> 0   opt 0x08448bc8
> Stack dump:
> 0.	Running pass 'Function Pass Manager' on module 'c35503g.bc'.
> 1.	Running pass 'Loop Pass Manager' on function '@_ada_c35503g'
> 2.	Running pass 'Canonicalize Induction Variables' on basic block  
> '%bb123'
> <c35503g.ll>

Hi Duncan,

This testcase exposes a mistaken assumption in my patch, that  
never have users. I'm working on a fix for this, but it may be a few  
before it's ready.  If these failures are causing trouble for you, feel
free to revert the patch, or possibly just the IndVarSimplify.cpp  
of the patch.


More information about the llvm-commits mailing list