nicholas at mxc.ca
Wed May 10 10:30:09 PDT 2006
Nick Lewycky wrote:
> I tested it with "opt -sccp". I should've included a properly runnable
> example the first time. Sorry. At least, running "opt -load-vn -gcse"
> does not convert foo into "102".
Further testing shows that the SCCP optimization will do handle it, and
so will the instruction combiner.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1784 bytes
Desc: not available
More information about the llvm-dev