From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFEA63858C00; Mon, 24 Jul 2023 06:20:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFEA63858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690179602; bh=K9iDs1RgQ9wk+VpRw/kD/dW7atJvRRdg3waRrZElrSk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pNcru2ipp08jw3Fo771SnDn2fIqBY6lkkSONTrEi7dOVJ2jGJTjCWC3o29sgdNlBR n6k7VG3l1JJnes8eULeJXvJRM/Fnr0E/rwp7uhj1niG8splDQxM4Tu7U2fy6NL4AGO ZCGwWJgu3ki6j691fj3nhXEHRn5f+Wmg0u9NViWU= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110751] RISC-V: Suport undefined value that allows VSETVL PASS use TA/MA Date: Mon, 24 Jul 2023 06:20:01 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de 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=3D110751 --- Comment #21 from rguenther at suse dot de --- On Fri, 21 Jul 2023, rsandifo at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110751 >=20 > --- Comment #20 from rsandifo at gcc dot gnu.org --- > (In reply to Richard Biener from comment #19) > > Sure, I can kind of see the usefulness elsewhere. Just for this partic= ular > > issue it doesn't seem necessary to sit down and design this when we can > > represent it like we do for MASK_LOAD (omit the 'else' value). > Yeah, that's fair. >=20 > For the ifn->optab interface, I think it'd be natural to use an actual rtx > rather than a null pointer, since e.g. predicates are not set up to handle > nulls. So perhaps we should start the process there. We could add an UN= DEF > rtl code that is initially only used for the ifn->optab interface, and ex= pand > it as we find new use cases. We can grow the semantics based on those use > cases and based on LLVM's experience. >=20 > > In other context we discussed specifying zero for MASK_LOAD masked elem= ents > > so we can for example CSE better. CSE with UNDEF might be possible as = well, > > but I'm not sure what LLVM's undef would allow and whether it's defined > > rigidly enough. > One of the main optimisations I wanted from that was: > a =3D IFN_MASK_LOAD (?, mask) > b =3D VEC_COND_EXPR > ? > a =3D IFN_MASK_LOAD (?, mask) > b =3D a > which wouldn't be valid for undef. Right. It would be valid to do b =3D IFN_MASK_LOAD (?, mask, {0,0,?}); if we add ELSE to IFN_MASK_LOAD.=