From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E10B63894422; Thu, 22 Apr 2021 14:50:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E10B63894422 From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100212] New: Shift by-1 in aarch64_classify_index Date: Thu, 22 Apr 2021 14:50:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: Thu, 22 Apr 2021 14:50:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100212 Bug ID: 100212 Summary: Shift by-1 in aarch64_classify_index Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- Bootstrapping on aarch64 --with-build-config=3Dbootstrap-ubsan shows the following issue (reduced from gcc.target/aarch64/sve/mask_struct_store_2.c): $ cat sve_test.c int *__restrict a; void b() { for (int c; c; ++c) a[c] =3D a[c * 3]; } $ gcc/xgcc -B gcc sve_test.c -c -march=3Darmv8.2-a+sve -O -ftree-vectorize /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:9556:10: runt= ime error: shift exponent -1 is negative #0 0x2de7d7c in aarch64_classify_index /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:9556 #1 0x2deca68 in aarch64_classify_address(aarch64_address_info*, rtx_def= *, machine_mode, bool, aarch64_addr_query_type) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:9781 #2 0x2df2bb8 in aarch64_legitimate_address_hook_p /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:9946 #3 0x1c673fc in memory_address_addr_space_p(machine_mode, rtx_def*, unsigned char) /home/alecop01/toolchain/src/gcc/gcc/recog.c:1793 #4 0x2389da4 in valid_mem_ref_p(machine_mode, unsigned char, mem_addres= s*) /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-address.c:355 #5 0x2500e84 in get_address_cost /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:4675 #6 0x2500e84 in get_computation_cost /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:4881 #7 0x2505f44 in determine_group_iv_cost_address /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:4990 #8 0x2505f44 in determine_group_iv_cost /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:5575 #9 0x2506b40 in determine_group_iv_costs /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:5769 #10 0x251287c in tree_ssa_iv_optimize_loop /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:8034 #11 0x251287c in tree_ssa_iv_optimize() /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop-ivopts.c:8083 #12 0x258c574 in execute /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop.c:513 #13 0x1b5ec1c in execute_one_pass(opt_pass*) /home/alecop01/toolchain/src/gcc/gcc/passes.c:2567 #14 0x1b623b8 in execute_pass_list_1 /home/alecop01/toolchain/src/gcc/gcc/passes.c:2656 #15 0x1b623f0 in execute_pass_list_1 /home/alecop01/toolchain/src/gcc/gcc/passes.c:2657 #16 0x1b623f0 in execute_pass_list_1 /home/alecop01/toolchain/src/gcc/gcc/passes.c:2657 #17 0x1b624d4 in execute_pass_list(function*, opt_pass*) /home/alecop01/toolchain/src/gcc/gcc/passes.c:2667 #18 0xc7b2a4 in cgraph_node::expand() /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:1830 #19 0xc7ff24 in expand_all_functions /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:1994 #20 0xc7ff24 in symbol_table::compile() /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:2358 #21 0xc8b81c in symbol_table::compile() /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:2271 #22 0xc8b81c in symbol_table::finalize_compilation_unit() /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:2539 #23 0x1f97478 in compile_file /home/alecop01/toolchain/src/gcc/gcc/toplev.c:482 #24 0x68d9b0 in do_compile /home/alecop01/toolchain/src/gcc/gcc/toplev.c:2201 #25 0x68d9b0 in toplev::main(int, char**) /home/alecop01/toolchain/src/gcc/gcc/toplev.c:2340 #26 0x6910d0 in main /home/alecop01/toolchain/src/gcc/gcc/main.c:39 #27 0xffffb95236dc in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x206dc) #28 0x691b2c (/data/alecop01/builds/bstrap-ubsan/gcc/cc1+0x691b2c)=