From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8EFA385841A; Thu, 7 Sep 2023 07:09:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8EFA385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694070593; bh=OUayDDiAcFcVkmiObWg9K6ba+8fJLtKoanyzCIXlXtM=; h=From:To:Subject:Date:From; b=iXSNlVnencBVb/0OKvESqa2inCp/J1GA+2HGNBhSjEQF1Zde+i9Td+HOZ787ZQoKv Jr27aHARSxpMoXqH1BD5ash0mVyQkyDN3twmpMdLGR+qd6PFE6SPauGa7kwHLuOU/G 3DnKSK6lkByTahmPpUdirrZjh590Hu4cuLdYnOOc= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111317] New: RISC-V: Incorrect COST model for RVV conversions Date: Thu, 07 Sep 2023 07:09:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111317 Bug ID: 111317 Summary: RISC-V: Incorrect COST model for RVV conversions Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: juzhe.zhong at rivai dot ai Target Milestone: --- #include void foo (int32_t *__restrict a, int64_t * __restrict b, int n) { for (int i =3D 0; i < n; i++) b[i] =3D (int64_t)a[i]; } --param=3Driscv-autovec-preference=3Dscalable -O3 -fopt-info-vec-missed: Failed to vectorize: :5:23: missed: couldn't vectorize loop :6:24: missed: not vectorized: no vectype for stmt: _4 =3D *_3; However, try -fno-vect-cost-model. We must adjust the COST model for RVV corretly.=