From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C6FD3858CD1; Fri, 26 Jan 2024 07:58:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C6FD3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706255901; bh=PeYeiGQtGdMRMggVOkLkAph1nseuSERhmH1U4P9DiGo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rjRmsCNM8BPqIYO7ojC2RH8J+QdHp14IkdFKrbyDPsMEku275ixdm2Zg3kUDQLjwd 9A/4yeWkMm5Kbkv3V8AxE7LBq1qFPbhLnhBYN1rOqwKwXyFHZ9p2FU3aGF4xTpULvn Q709bOZFpfMc8X57iN9Yxu1yQS5Fw7uiSw/hS9OU= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113609] EQ/NE comparison between avx512 kmask and -1 can be optimized with kxortest with checking CF. Date: Fri, 26 Jan 2024 07:58: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: 14.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=3D113609 --- Comment #2 from Uro=C5=A1 Bizjak --- (In reply to Hongtao Liu from comment #1) > Since they're different modes, CCZ for cmp, but CCS for kortest, it could= be > diffcult to optimize it in RA stage by adding alternatives(like we did for > compared to 0). So the easy way could be adding peephole to hanlde that. You can use pre-reload split for this. Please see for example how *jcc_bt and *bt_setcqi provide compound operation (constructed from CCZmode compare) that is later split to CCCmode operation. You will have to provide= jcc and setcc patterns to fully handle mode change.=