From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4909E3858C41; Fri, 24 Nov 2023 13:28:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4909E3858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700832508; bh=5Uz5eH252Gw5hguPz6fZldHVcgOdx2N73zlDG9C/w44=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Sx3fiOFdScNMSBty2ORRSP3P1YAAcWQZydFTj7FQBSRFlCFQKjW060qiEL40+Af8e pgtJWZb3k7vGaLaWB10LYX6NYjDU4UgzQsZwrFCRS4G8gtfsR55ngR1C5LmPtpdjDS rKi3ZN6RJWZ+qjey6BnBckiQwWFa9HCnKnpepbrE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112694] RISC-V: zve64d testing expose many ICE on C/C++ testing Date: Fri, 24 Nov 2023 13:28:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112694 --- Comment #5 from CVS Commits --- The master branch has been updated by Pan Li : https://gcc.gnu.org/g:aea337cf740ec33022f3cabfa7dd4333d5ba78ee commit r14-5825-gaea337cf740ec33022f3cabfa7dd4333d5ba78ee Author: Juzhe-Zhong Date: Fri Nov 24 16:34:28 2023 +0800 RISC-V: Fix inconsistency among all vectorization hooks This patches 200+ ICEs exposed by testing with rv64gc_zve64d. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112694 The rootcause is we disallow poly (1,1) size vectorization in preferred_simd_mode. with this following code: - if (TARGET_MIN_VLEN < 128 && TARGET_MAX_LMUL < RVV_M2) - return word_mode; However, we allow poly (1,1) size in hook: TARGET_VECTORIZE_RELATED_MODE TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES And also enables it in all vectorization patterns. I was adding this into preferred_simd_mode because poly (1,1) size mode will cause ICE in can_duplicate_and_interleave_p. So, the alternative approach we need to block poly (1,1) size in both TARGET_VECTORIZE_RELATED_MODE and TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES hooks and all vectoriza= tion patterns. which is ugly approach and too much codes change. Now, after investivation, I find it's nice that loop vectorizer can automatically block poly (1,1) size vector in interleave vectorization with this commit: =20=20=20 https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3D730909fa858bd691095bc23= 655077aa13b7941a9 So, we don't need to worry about ICE in interleave vectorization and al= low poly (1,1) size vector in vectorization which fixes 200+ ICEs in zve64d march. PR target/112694 gcc/ChangeLog: * config/riscv/riscv-v.cc (preferred_simd_mode): Allow poly_int (1,1) vectors. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr112694-1.c: New test.=