User account creation filtered due to spam.

Bug 37694

Summary: [alias-improvements-branch] can't alias (restrict) function-pointer (read) and local array (write)
Product: gcc Reporter: dorit
Component: tree-optimizationAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3 Keywords: alias, missed-optimization
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on: 14187    
Bug Blocks: 37696    

Description dorit 2008-10-01 14:16:57 UTC
This happens in testcases gcc.dg/vect/no-scevccp-outer-6.c and gcc.dg/vect/vect-multitypes-6.c:

On the alias branch we can't tell that a read through a (restrict) pointer (which is a function argument) does not overlap with write to a local arrays. As a result we try to vectorize the loop using loop-versioning controled by a run-time aliasing test.

In no-scevccp-outer-6.c this capability is not yet supported for outer-loops so we can't vectorize the outer-loop (the inner loop does get vectorized).

In vect-multitypes-6.c there are too many runtime checks required, so we bail out:
> "
> === vect_prune_runtime_alias_test_list ===
> vect-multitypes-6.c:34: note: disable versioning for alias - max number of
> generated checks exceeded.
> vect-multitypes-6.c:34: note: too long list of versioning for alias
> run-time tests.
> "
(with --param vect-max-version-for-alias-checks=20 we do vectorize the loop).
Comment 1 Richard Biener 2008-10-01 14:24:47 UTC
restricted pointers are still not properly handled by the middle-end, neither
are they dealt with by the alias-oracle.
Comment 2 Richard Biener 2009-01-04 13:11:40 UTC
The testcases are fixed on the branch.