[LLVMdev] Bug in InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Tue Sep 17 16:08:05 PDT 2002

> ISSUE: This code:
> Crashes when run through opt -instcombine.  InstCombiner visits


Thanks for finding this!  Dead bugs are the best kind.  :)


> instructions in reverse declaration order, but
> InstCombiner::visitGetElementPtr() , when trying to combine %pbobel with
> %pbob2, assumes that aliases like %pbob2 have already been eliminated.
>  The result is a dereference of an invalid iterator, and an attempt to
> replace %pbobel with "getelementptr %bob* %pbob1, ubyte 0".
> ACTION: When  combining constant index expressions in InstCombiner,
> treat the source index as 0 if not present.
> --
> Casey Carter
> Casey at Carter.net
> ccarter at uiuc.edu
> AIM: cartec69



More information about the llvm-dev mailing list