From patchwork Wed Sep 8 14:29:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Improve PR33244 somewhat Date: Wed, 08 Sep 2010 04:29:20 -0000 From: Michael Matz X-Patchwork-Id: 64153 Message-Id: To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Hi, On Tue, 7 Sep 2010, Richard Guenther wrote: > On Tue, Sep 7, 2010 at 2:32 PM, Michael Matz wrote: > > Hello, > > > > this patch fixes one problem of those preventing to vectorize the testcase > > in PR33244.  Namely that code sinking sometimes fills loop latch blocks > > preventing later vectorization.  Changed by ensuring that we don't sink > > anything into a latch block that is still empty. > > > > The testcase I add is a modified version of the testcase in the PR because > > of unrelated problems also preventing vectorization (inlining needs to > > happen, a library with vectorized logf needs to be available, and loop > > interchange needs to work). > > > > Regstrapping on x86_64-linux (all default languages) in progress.  Okay? > > Ok. Seems I was careless when comparing testresults, uninit-17.c now fails because the imm-use chain for the uninitialized SSA name is ordered differently, therefore the first found uninitialized use is different from before the patch. Hence I'm checking in this patch as obvious. Ciao, Michael. -- * c-c++-common/uninit-17.c: Adjust. Index: testsuite/c-c++-common/uninit-17.c =================================================================== --- testsuite/c-c++-common/uninit-17.c (revision 164001) +++ testsuite/c-c++-common/uninit-17.c (working copy) @@ -11,9 +11,9 @@ static void bar(int a, int *ptr) { int b; /* { dg-message "declared" } */ if (b < 40) { - ptr[0] = b; /* { dg-warning "may be used uninitialized" } */ + ptr[0] = b; } - b += 1; + b += 1; /* { dg-warning "may be used uninitialized" } */ ptr++; } while (--a != 0);