[LLVMdev] SCCP

Chris Lattner sabre at nondot.org
Wed May 24 10:35:33 PDT 2006


On Wed, 10 May 2006, Nick Lewycky wrote:
> Nick Lewycky wrote:

Hi Nick,

Sorry for the delay. :(

> Chris Lattner wrote:
>>> I'd suggest fixing this in the instcombine pass.  This isn't something
>>> that the 'conditionalness' of SCCP adds value for, so doing it in a
>>> simpler place is better.  If you have any questions about extending
>>> instcombine (or anything else), please ask. :)
>
> I've patched the instruction combiner to return UndefValue when the
> index is constant and known to be out of range for either an ArrayType
> or PackedType.
>
> Patch attached.

Very nice, and it includes a testcase, perfect!  I've applied your patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060522/035049.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060522/035050.html

Thanks, and sorry again for the delay :(

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list