From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 050953858C31; Thu, 26 Oct 2023 01:46:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 050953858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698284807; bh=smztjuYyxdRVzVtRGGYCPqZO/JDHlzntNY9Euvwr4V8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YAMxKfbypfJgBnwBz4qjJzZqUrNMoU+r55xz86y2DQl2qmfdfJUo7R7Z2oOA7kfZk e/U/kHH4TZoADDC/6VMiiabFzn2XZSyeO4e9jEOSLojA+ssFeW2bAG2Z6v168atNj/ Pt1Wa3bics82mtEDUNAKk3ll+5Ld6d6B5CokXb+g= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112092] RISC-V: Wrong RVV code produced for vsetvl-11.c and vsetvlmax-8.c Date: Thu, 26 Oct 2023 01:46:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai 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: cc 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=3D112092 JuzheZhong changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |juzhe.zhong at rivai dot ai --- Comment #1 from JuzheZhong --- No, it is correct. It's the fancy optimization we have done in VSETVL PASS. e16mf2 is same ratio e32m1. The later loop demand e32m1 and TU, so we fuse it into e16mf2 (__riscv_vsetvl_e16mf2(avl)), change it into e32m1 and TU. This is a valid optimization. You can change e16mf2 into e16m1. I am sure the fusion will be blocked.=