From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD7C83858C66; Thu, 29 Feb 2024 07:26:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD7C83858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709191614; bh=KLihbYMSnDqdQ9cj6Qj7y1LcVrcX4WM2ILSzTuqKR/Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AO4P8TqIGyB5h4QL4yQiGIjgyw6erXk9wKubvA4UAyS0+ym0MQP9s+1EbHerUWdH4 JxbMMC8BnEHeWjnfjsur/U7QNJEM4+DD47DQKu6xhNWFWJ1YgnbQEIqqiS+oQs0edt zU9mdXCTnUEImL2dIjIPQadtGAzalhSdiiw+7gf4= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98877] [AArch64] Inefficient code generated for tbl NEON intrinsics Date: Thu, 29 Feb 2024 07:26:53 +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: 12.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tnfchris at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D98877 --- Comment #11 from Tamar Christina --- (In reply to Andrew Pinski from comment #10) > (In reply to Tamar Christina from comment #9) > > While RA should be able to deal with this, > > shouldn't we also just lower TBLs in gimple? > >=20 > > This no reason why this can't be a VEC_PERM_EXPR which would also get t= he > > copies > > removed at the gimple level and allows us to optimize this to something= else > > depending on the index. >=20 > Yes there is a reason, `out of range` values for VEC_PERM is undefined wh= ile > tbl is well defined ( If an index is out of range for the table, the res= ult > for that lookup is 0.). >=20 I don't think that's not a good reason. The out of range values can be made implementation defined. i.e. mid-end shouldn't care about them. not lowering this in gimple means we lose a heck of a lot of optimizations = that are impossible to cover in RTL.=