From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 060D53858C5F; Thu, 8 Feb 2024 03:18:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 060D53858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707362300; bh=eH/zRMemM5drX4HEUJij/520OsY7ftlM7oxY036OiIU=; h=From:To:Subject:Date:From; b=PjWuHGLQ4Rxxi5cJIFX/OwDN6Kb52I/Z6XKBr/arpMB+ndVNEfExdp0RJTOKQ9xqF MoE6SUndHEfwSB519XTbFJHoyUdrg4yf06z9bV7B4P8DqN/VHuvcSnJpD4ZQFZ1uyh P+HQdyRjV2XzSQq7PyDrD6+8IrLNHgLMcmxts0SM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113822] New: aarch64_evpc_reencode could/should use new_shrunk_vector instead of manually doing it Date: Thu, 08 Feb 2024 03:18:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: internal-improvement X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget 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=3D113822 Bug ID: 113822 Summary: aarch64_evpc_reencode could/should use new_shrunk_vector instead of manually doing it Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: internal-improvement Severity: enhancement Priority: P3 Component: target Assignee: pinskia at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: aarch64 The current code does: ``` /* Convert the perm constant if we can. Require even, odd as the pairs. = */ for (unsigned int i =3D 0; i < nelt; i +=3D 2) { poly_int64 elt0 =3D d->perm[i]; poly_int64 elt1 =3D d->perm[i + 1]; poly_int64 newelt; if (!multiple_p (elt0, 2, &newelt) || maybe_ne (elt0 + 1, elt1)) return false; newpermconst.quick_push (newelt.to_constant ()); } newpermconst.finalize (); ``` But that is just: ``` vec_perm_indices newpermindices; if (!newpermindices.new_shrunk_vector(d->perm, 2)) return false; ... newd.perm.new_vector (newpermindices.encoding (), d.one_vector_p ? 1 : 2, newpermindices.nelts_per_input ()); ``` Filing so I remember to make this change. Note I noticed this while implementing V2HI/V4QI support.=