------- Comment #2 from rguenth at gcc dot gnu dot org 2007-02-13 12:48 -------
I get
./cc1 -quiet -O -march=athlon-xp -m32 -ftree-vectorize x.i
x.i: In function 'foo':
x.i:2: error: invalid reference prefix
{4, 4, 4, 4}
x.i:2: error: invalid reference prefix
{4, 4, 4, 4}
x.i:2: error: invalid reference prefix
{4, 4, 4, 4}
x.i:2: error: invalid reference prefix
{4, 4, 4, 4}
x.i:2: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
After vectorization:
<bb 2>:
stmp_var_.29_22 = 2;
stmp_var_.30_23 = stmp_var_.29_22 + 1;
stmp_var_.31_24 = stmp_var_.30_23 + 1;
vect_cst_.32_25 = {1, stmp_var_.29_22, stmp_var_.30_23, stmp_var_.31_24};
vect_cst_.33_26 = {4, 4, 4, 4};
vect_pirows.39_29 = (vector int *) &irows;
vect_pirows.35_30 = vect_pirows.39_29;
# ivtmp.41_33 = PHI <ivtmp.41_34(7), 0(2)>
# ivtmp.40_31 = PHI <ivtmp.40_32(7), vect_pirows.35_30(2)>
# vect_vec_iv_.34_27 = PHI <vect_vec_iv_.34_28(7), vect_cst_.32_25(2)>
# ivtmp.25_1 = PHI <ivtmp.25_5(7), 999(2)>
# i_10 = PHI <i_4(7), 1(2)>
<L0>:;
D.1842_3 = i_10 + -1;
vect_vec_iv_.34_28 = vect_vec_iv_.34_27 + vect_cst_.33_26;
*ivtmp.40_31 = vect_vec_iv_.34_27;
i_4 = i_10 + 1;
ivtmp.25_5 = ivtmp.25_1 - 1;
ivtmp.40_32 = ivtmp.40_31 + 16B;
ivtmp.41_34 = ivtmp.41_33 + 1;
if (ivtmp.41_34 < 249) goto <L5>; else goto <L10>;
(looks good)
but then veclower does
# ivtmp.41_33 = PHI <ivtmp.41_34(7), 0(2)>
# ivtmp.40_31 = PHI <ivtmp.40_32(7), vect_pirows.35_30(2)>
# vect_vec_iv_.34_27 = PHI <vect_vec_iv_.34_28(7), vect_cst_.32_25(2)>
# ivtmp.25_1 = PHI <ivtmp.25_5(7), 999(2)>
# i_10 = PHI <i_4(7), 1(2)>
<L0>:;
D.1842_3 = i_10 + -1;
D.1899_20 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 0>;
D.1900_19 = BIT_FIELD_REF <vect_cst_.33_26, 32, 0>;
D.1901_17 = D.1899_20 + D.1900_19;
D.1902_35 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 32>;
D.1903_36 = BIT_FIELD_REF <vect_cst_.33_26, 32, 32>;
D.1904_37 = D.1902_35 + D.1903_36;
D.1905_38 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 64>;
D.1906_39 = BIT_FIELD_REF <vect_cst_.33_26, 32, 64>;
D.1907_40 = D.1905_38 + D.1906_39;
D.1908_41 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 96>;
D.1909_42 = BIT_FIELD_REF <vect_cst_.33_26, 32, 96>;
D.1910_43 = D.1908_41 + D.1909_42;
vect_vec_iv_.34_28 = {D.1901_17, D.1904_37, D.1907_40, D.1910_43};
*ivtmp.40_31 = vect_vec_iv_.34_27;
i_4 = i_10 + 1;
ivtmp.25_5 = ivtmp.25_1 - 1;
ivtmp.40_32 = ivtmp.40_31 + 16B;
ivtmp.41_34 = ivtmp.41_33 + 1;
if (ivtmp.41_34 < 249) goto <L5>; else goto <L10>;
but then DOM const-props into the BIT_FIELD_REFs which confuses us:
# ivtmp.44_8 = PHI <ivtmp.44_45(3), 0(2)>
# vect_vec_iv_.34_27 = PHI <vect_vec_iv_.34_28(3), vect_cst_.32_25(2)>
<L0>:;
D.1899_20 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 0>;
D.1900_19 = BIT_FIELD_REF <{4, 4, 4, 4}, 32, 0>;
D.1901_17 = D.1899_20 + D.1900_19;
D.1902_35 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 32>;
D.1903_36 = BIT_FIELD_REF <{4, 4, 4, 4}, 32, 32>;
D.1904_37 = D.1902_35 + D.1903_36;
D.1905_38 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 64>;
D.1906_39 = BIT_FIELD_REF <{4, 4, 4, 4}, 32, 64>;
D.1907_40 = D.1905_38 + D.1906_39;
D.1908_41 = BIT_FIELD_REF <vect_vec_iv_.34_27, 32, 96>;
D.1909_42 = BIT_FIELD_REF <{4, 4, 4, 4}, 32, 96>;
D.1910_43 = D.1908_41 + D.1909_42;
vect_vec_iv_.34_28 = {D.1901_17, D.1904_37, D.1907_40, D.1910_43};
MEM[symbol: irows, index: ivtmp.44_8] = vect_vec_iv_.34_27;
ivtmp.44_45 = ivtmp.44_8 + 16;
if (ivtmp.44_45 != 3984) goto <L0>; else goto <L15>;
so we fail to fold BIT_FIELD_REF <{4, 4, 4, 4}, 32, 96> to a constant for
example.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com,
| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30784