From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B549F3858D32; Sun, 7 May 2023 16:21:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B549F3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683476497; bh=N2+TuqySu4m5vFpIvyoL2+bOWOdltKOYY0GqiO6HKhI=; h=From:To:Subject:Date:From; b=rVnwNagopBJ7Ex3clSOydEpCSAiG/MK+bwO/fCElPU6+WWWHcQ3BJRYchEfi4A0IY sNKj9lfHhqHbZAMhzLombCRLvyYX8LtZ7ESAHaawEtFZKHvkYDnq1wwo5tsOrY8f46 7TkGoCwcYkzEMVojze8af0wkHdwZUBi1AEx6P98c= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109764] New: V2SI multiply high is not vectorized on x86_64 Date: Sun, 07 May 2023 16:21:37 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail 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 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=3D109764 Bug ID: 109764 Summary: V2SI multiply high is not vectorized on x86_64 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- The folowing testcase: --cut here-- #define N 2 unsigned int ur[N], ua[N], ub[N]; void mulh (void) { int i; for (i =3D 0; i < N; i++) ur[i] =3D ((unsigned long) ua[i] * ub[i]) >> 32; } void mulh_slp (void) { ur[0] =3D ((unsigned long) ua[0] * ub[0]) >> 32; ur[1] =3D ((unsigned long) ua[1] * ub[1]) >> 32; } --cut here-- should vectorize on x86_64 with the patch I'm going to attach, and with -fno-vect-cost-model. The compiler however does not even consider "mulv2si3_highpart" pattern.=