From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BF273857357; Tue, 15 Aug 2023 15:23:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BF273857357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692113002; bh=RBjLfO5YpLZslV+hR6jkTrfBwCuwJUthcllr83sfXgw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GRoj5IYXeTmTL7V4WP9v6IAZ2PfH3u5Qb5wh4Vi3lPwI8WznToAjg2jStGo97Japx FvGhloMPl2O62YF3j6N9YlmbXMFYm2+qbG2QuasDSX8GeqyYlc1a+nyzd4SZQMwx/y q1i5MHgo5SoPj+qoLEpU0eQbZYc/NlIOdut0T8OM= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111023] missing extendv4siv4hi (and friends) Date: Tue, 15 Aug 2023 15:23:21 +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: 13.1.0 X-Bugzilla-Keywords: missed-optimization 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: 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=3D111023 --- Comment #1 from Uro=C5=A1 Bizjak --- (In reply to Richard Biener from comment #0) > We could vectorize gcc.dg/vect/pr65947-7.c if we implement the > extendv4siv4hi pattern (sign-extend V4HI to V4SI). We can already do > vec_unpacks_lo via >=20 > pcmpgtw %xmm0, %xmm1 > movdqa %xmm0, %xmm2 > punpcklwd %xmm1, %xmm2 >=20 > and that would trivially extend to the required pattern - just the > input is v4hi instead of v8hi. >=20 > Other related patterns are probably missing as well, where we can do > vec_unpack[s]_lo we should be able to implement [zero_]extend. We have: (define_expand "v4hiv4si2" [(set (match_operand:V4SI 0 "register_operand") (any_extend:V4SI (match_operand:V4HI 1 "nonimmediate_operand")))] "TARGET_SSE4_1" in sse.md, so the testcase should be vectorized using -msse4.1. Is there any other pattern missing for efficient vectorization?=