Bug 37699 - [alias-improvements-branch] can't alias ptr and local array
Summary: [alias-improvements-branch] can't alias ptr and local array
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Richard Biener
URL:
Keywords: missed-optimization
Depends on:
Blocks: 37696
  Show dependency treegraph
 
Reported: 2008-10-01 14:32 UTC by dorit
Modified: 2009-01-04 01:23 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-01-03 00:31:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dorit 2008-10-01 14:32:04 UTC
This happens in gcc.dg/vect/vect-96.c and gcc.dg/vect/no-vfa-vect-43.c.

In the first, we can't distinguish between a write through a (local) pointer to a global array (which is a field in a struct), and a read from a local array. s a result we vectorize the loop using loop-versioning controled by a run-time aliasing test, which also means we'll use versioning instead of peeling to align a misaligned store.

In the second, we can't tell that reads through a pointer (which is a function argument) do not overlap with a write to a local array. As a result we try to
vectorize the loop using loop-versioning controled by a run-time aliasing
test, however this testcase doe not allow that (--param
vect-max-version-for-alias-checks=0), so vectorization fails.
Comment 1 Richard Biener 2009-01-03 00:31:44 UTC
Mine.
Comment 2 Richard Biener 2009-01-04 01:23:44 UTC
Fixed.