[llvm-commits] [llvm] r142731 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/load.ll

Nick Lewycky nlewycky at google.com
Mon Oct 24 14:05:55 PDT 2011


On 24 October 2011 12:07, Eli Friedman <eli.friedman at gmail.com> wrote:

> On Sat, Oct 22, 2011 at 12:58 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> > Author: nicholas
> > Date: Sat Oct 22 14:58:20 2011
> > New Revision: 142731
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=142731&view=rev
> > Log:
> > Make SCEV's brute force analysis stronger in two ways. Firstly, we should
> be
> > able to constant fold load instructions where the argument is a constant.
> > Second, we should be able to watch multiple PHI nodes through the loop;
> this
> > patch only supports PHIs in loop headers, more can be done here.
> >
> > With this patch, we now constant evaluate:
> >  static const int arr[] = {1, 2, 3, 4, 5};
> >  int test() {
> >    int sum = 0;
> >    for (int i = 0; i < 5; ++i) sum += arr[i];
> >    return sum;
> >  }
>
> This commit is causing a miscompile on
> gcc.c-torture/execute/20030105-1.c (and possibly a couple other
> tests).


Thanks Eli! Fixed in r142843.

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111024/eaf18ec5/attachment.html>


More information about the llvm-commits mailing list