The hot loop in SPEC2000/179.art scanner.c (line 615) does not get vectorized
due to data ref analysis failure:
(The original loop contains invariant store which I manually extracted out of
the loop. Will try to generate a testcase.)
Taken from the vectorizer dump:
(instantiate_scev
(instantiate_below = 252)
(evolution_loop = 56)
(chrec = {(double *) pretmp.1559_2569 + (long unsigned int) pretmp.1564_2574,
+, (long unsigned int) pretmp.1561_2571}_56)
(res = {(double *) pretmp.1559_2569 + (long unsigned int) pretmp.1564_2574,
+, (long unsigned int) pretmp.1561_2571}_56))
base_address:
offset from base address:
constant offset from base address:
step:
aligned to:
base_object: *((double *) pretmp.1559_2569 + (long unsigned int)
(D.8586_1080 * 8))
(compute_affine_dependence
(stmt_a =
D.8555_1089 = D.8600_1088->P;
)
(stmt_b =
D.8548_1100 = *D.8549_1099;
)
)
scanner.c:615: note: get vectype with 2 units of type double
scanner.c:615: note: vectype: vector double
scanner.c:615: note: not vectorized: data ref analysis failed D.8548_1100 =
*D.8549_1099;
scanner.c:615: note: bad data references.(get_loop_exit_condition
Here are the flags that I used:
/data1/eres/mainline45/bbuild/bin/gcc -m64 -DSPEC_CPU2000_LP64
-mrecip -m64 -fpeel-loops -funroll-loops -ftree-loop-linear -ffast-math -O3
-maltivec -mvsx -Wa,-mpower7 -Wa,-mvsx -mcpu=power7 -fwhole-program
--combine -fipa-matrix-reorg -fdump-tree-vect-details scanner.c -lm -o
art
--
Summary: missed optimization: Scalar evolution analysis prevents
vectorization
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eres at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41499