http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53295
Bug #: 53295
Summary: Vectorizer support for non-constant strided loads
depends on gather support overwriting the data-ref
with bogus data
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
If you look at the testcase for PR53185 you can see that we compute the
data-reference for the strided load twice:
Creating dr for *D.1732_13
analyze_innermost: failed: evolution of base is not affine.
base_address:
offset from base address:
constant offset from base address:
step:
aligned to:
base_object: *pretmp.15_35
Access function 0: {0B, +, (long unsigned int) pretmp.17_38 * 4}_2
this is the failing one (because analyze_innermost does not allow for
non-constant strides - sth to be really fixed).
Creating dr for *D.1732_13
analyze_innermost: success.
base_address: pretmp.15_35 + (long unsigned int) D.1729_10 * 4
offset from base address: 0
constant offset from base address: 0
step: 0
aligned to: 128
base_object: *D.1732_13
that's the one by gather support, guarded by
targetm.vectorize.builtin_gather != NULL (which is only !NULL on x86). But
this DR is for basic-block analysis, thus does not properly reflect
what the non-constant strided load code would want to use (it doesn't use
that info though).
Possibly the non-constant strided load testcases fail on targets other than
x86 (with support for vectorizing doubles).