From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 443E9385BF92; Wed, 1 Apr 2020 08:55:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 443E9385BF92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585731302; bh=aHbccNq+OLwcuD4+U2HqPbxbCoL2PP2iG1Dq8xOuFc4=; h=From:To:Subject:Date:From; b=T5Il2Ft6JOp92tRjb5AoG2TfuZVmwJBX98l9goNaSOpH9tuky0jrfdhONl11JTuzh 7JV4jJn6vz1mo2P/wfhFvFb2SoKaDdTXSYw3unYwfBOZROrdK+4WkmA/ho56JrZpaI +E/4Z3URSiuqvVCPeWv+/5hv5mE9ODFEuM/j8cck= From: "bule1 at huawei dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94434] New: [AArch64][SVE] ICE caused by incompatibility of SRA and svst3 builtin-function Date: Wed, 01 Apr 2020 08:55:02 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bule1 at huawei dot com 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 cc target_milestone cf_gcctarget attachments.created 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: Wed, 01 Apr 2020 08:55:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94434 Bug ID: 94434 Summary: [AArch64][SVE] ICE caused by incompatibility of SRA and svst3 builtin-function Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bule1 at huawei dot com CC: mjambor at suse dot cz Target Milestone: --- Target: aarch64 Created attachment 48154 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48154&action=3Dedit patch for the problem test case: gcc/testsuite/gcc.target/aarch64/sve/acle/asm/st2_bf16.c Command line:gcc st2_bf16.c -march=3Darmv8.2-a+sve -msve-vector-bits=3D256 = -O2 -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=3Dnever -fdiagnostics-urls=3Dnever -DTEST_OVERLOADS -fno-ipa-icf -c -o st2_bf16.o during IPA pass: sra st2_bf16.c: In function =E2=80=98st2_vnum_bf16_x1=E2=80=99: st2_bf16.c:198:1: internal compiler error: Segmentation fault 0xc995b3 crash_signal ../.././gcc/toplev.c:328 0xa34f68 hash_map, isra_call_summary*, simple_hashmap_traits >, isra_call_summary*> >::get_or_insert(int const&, bool*) ../.././gcc/hash-map.h:194 0xa34f68 call_summary::get_create(cgraph_edge*) ../.././gcc/symbol-summary.h:642 0xa34f68 record_nonregister_call_use ../.././gcc/ipa-sra.c:1613 0xa34f68 scan_expr_access ../.././gcc/ipa-sra.c:1781 0xa37627 scan_function ../.././gcc/ipa-sra.c:1880 0xa37627 ipa_sra_summarize_function ../.././gcc/ipa-sra.c:2505 0xa38437 ipa_sra_generate_summary ../.././gcc/ipa-sra.c:2555 0xbb58bb execute_ipa_summary_passes(ipa_opt_pass_d*) ../.././gcc/passes.c:2191 0x7f672f ipa_passes ../.././gcc/cgraphunit.c:2627 0x7f672f symbol_table::compile() ../.././gcc/cgraphunit.c:2737 0x7f89ab symbol_table::compile() ../.././gcc/cgraphunit.c:2717 0x7f89ab symbol_table::finalize_compilation_unit() ../.././gcc/cgraphunit.c:2984 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Similar problems can be found in svst2=E3=80=81svst4 and other functions of= this kind. This problem is cause by "record_nonregister_call_use" function trying to access the call graph edge of an internal call, .MASK_STORE_LANE, which is a NULL pointer. The reason of stepping into "record_nonregister_call_use" function is that = the upper level function "scan_expr_access" considered the "svbfloat16x3_t z1" argument as a valid candidate for further optimization. A simple solution here is to disqualify the candidate at "scan_expr_access" level when the call graph edge is null, which indicates the call is either = an internal call or a call with no references. For both case, the further optimization process should stop before it reference a NULL pointer. A proposed patch is attached.=