From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30677 invoked by alias); 13 Feb 2007 12:49:10 -0000 Received: (qmail 30610 invoked by uid 48); 13 Feb 2007 12:48:56 -0000 Date: Tue, 13 Feb 2007 12:49:00 -0000 Message-ID: <20070213124856.30609.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/30784] ICE on loop vectorization (-O1 -march=athlon-xp -ftree-vectorize) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-02/txt/msg01378.txt.bz2 ------- 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 for instructions. After vectorization: : 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.40_31 = PHI # vect_vec_iv_.34_27 = PHI # ivtmp.25_1 = PHI # i_10 = PHI :; 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 ; else goto ; (looks good) but then veclower does # ivtmp.41_33 = PHI # ivtmp.40_31 = PHI # vect_vec_iv_.34_27 = PHI # ivtmp.25_1 = PHI # i_10 = PHI :; D.1842_3 = i_10 + -1; D.1899_20 = BIT_FIELD_REF ; D.1900_19 = BIT_FIELD_REF ; D.1901_17 = D.1899_20 + D.1900_19; D.1902_35 = BIT_FIELD_REF ; D.1903_36 = BIT_FIELD_REF ; D.1904_37 = D.1902_35 + D.1903_36; D.1905_38 = BIT_FIELD_REF ; D.1906_39 = BIT_FIELD_REF ; D.1907_40 = D.1905_38 + D.1906_39; D.1908_41 = BIT_FIELD_REF ; D.1909_42 = BIT_FIELD_REF ; 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 ; else goto ; but then DOM const-props into the BIT_FIELD_REFs which confuses us: # ivtmp.44_8 = PHI # vect_vec_iv_.34_27 = PHI :; D.1899_20 = BIT_FIELD_REF ; 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 ; 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 ; 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 ; 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 ; else goto ; 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