From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E78D43858410; Fri, 21 Jul 2023 13:23:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E78D43858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689945828; bh=nL5Km2HKPrKD8F1JKtr8K61VqRMW/n6ebWFg0L0c6gg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Rb1zW8u9+vva/axJMsDLpEVyE/KCct/EdkThXqGjrzlDNn1vxQWlv7PmvN1qqRfvR UZYGuukej5jJW+7slmF/5pnoexg+kAHsVaXRo/JalDpATuuMCUBD89lGnAhlSCc1dS rQFY5L+cFaQm6tURebX0FkTFI2uxgsVgNJpmTFUQ= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110751] RISC-V: Suport undefined value that allows VSETVL PASS use TA/MA Date: Fri, 21 Jul 2023 13:23:48 +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: rsandifo at gcc dot gnu.org 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 #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 particul= ar > 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. 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 UNDEF rtl code that is initially only used for the ifn->optab interface, and expa= nd it as we find new use cases. We can grow the semantics based on those use cases and based on LLVM's experience. > In other context we discussed specifying zero for MASK_LOAD masked elemen= ts > so we can for example CSE better. CSE with UNDEF might be possible as we= ll, > 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 (=E2=80=A6, mask) b =3D VEC_COND_EXPR =E2=86=92 a =3D IFN_MASK_LOAD (=E2=80=A6, mask) b =3D a which wouldn't be valid for undef.=