From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A70CD385E021; Fri, 20 Nov 2020 14:45:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A70CD385E021 From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) Date: Fri, 20 Nov 2020 14:45:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2020 14:45:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97929 Bug ID: 97929 Summary: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- For the following testcase: extern int a[]; void b(short c) { for (long d; d; d +=3D 1) a[d] =3D -(1 - c); } we ICE on AArch64 with: $ aarch64-elf-gcc -c -O1 -ftree-vectorize test.c during GIMPLE pass: vect test.c: In function 'b': test.c:2:6: internal compiler error: in exact_div, at poly-int.h:2219 2 | void b(short c) { | ^ 0x109cf78 poly_int<2u, poly_result::is_poly>::type, poly_coeff_pair_traits::is_poly>::type>::result_kind>::type> exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long> const&, unsigned long) /home/alecop01/toolchain/src/gcc/gcc/poly-int.h:2219 0x109cf78 poly_int<2u, poly_result::result_kind>::type> exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long> const&, poly_int_pod<2u, unsigned long> const&) /home/alecop01/toolchain/src/gcc/gcc/poly-int.h:2232 0x109cf78 vect_get_num_vectors /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.h:1617 0x109cf78 vect_get_num_copies /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.h:1628 0x109cf78 vectorizable_conversion /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:4686 0x10b8f31 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*, _slp_instance*, vec*) /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10694 0x10d9660 vect_analyze_loop_operations /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:1758 0x10db3be vect_analyze_loop_2 /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:2478 0x10db3be vect_analyze_loop(loop*, vec_info_shared*) /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:2925 0x110a3df try_vectorize_loop_1 /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:995 0x110a917 try_vectorize_loop /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1148 0x110acf1 vectorize_loops() /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1229 0xf95b63 execute /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop.c:414 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. I can reproduce this since r11-5165-gd84ba819fe. However, prior to this com= mit, the build was broken since r11-5158-gec383f0bd, so the ICE could have been introduced by any of these commits: d84ba819fe2 Fix bootstrap 717e22dcd48 Fix gcc.dg/pr97897.c b08e0ee3018 refactor reassocs get_rank d8cf8976749 Fix operand_equal_p hash and copare of ODR_TYPE_REF 27842e2a1eb [3/3] [AArch64][vect] vec_widen_lshift pattern 9fc9573f9a5 [2/3] [vect] Add widening add, subtract patterns ec46904edfe [1/3][aarch64] Add vec_widen patterns to aarch64 ec383f0bdb4 tree-optimization/97901 - ICE propagating out LC PHIs=