From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 05FAD3858D33; Mon, 30 Oct 2023 05:54:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05FAD3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1698645266; bh=m5+EENdhjdr/L+pi6Y9i7FFq9angXFkSuNZCxDvTzHM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ahyeHYA92aeKiq/lCUpFu/Wim6osFkKZTjWQ7dVx/pX96e0T6qqzLDXaQD1PREq9X JxnC8tjX4h7me2rPo34PuTv7WB+fByuWOAR77PbgQZ4NWvBdHkGQfSFxeSYjGYJeA8 hqBRKJuv4NexdmpfdzApq8En/dejngGSRyZ1FSi8= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112276] [14 Regression] wrong code with -O2 -msse4.2 since r14-4964-g7eed861e8ca3f5 Date: Mon, 30 Oct 2023 05:54:25 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz 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: 14.0 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=3D112276 --- Comment #5 from Zdenek Sojka --- (In reply to Hongtao.liu from comment #4) > -(define_split > - [(set (match_operand:V2HI 0 "register_operand") > - (eq:V2HI > - (eq:V2HI > - (us_minus:V2HI > - (match_operand:V2HI 1 "register_operand") > - (match_operand:V2HI 2 "register_operand")) > - (match_operand:V2HI 3 "const0_operand")) > - (match_operand:V2HI 4 "const0_operand")))] > - "TARGET_SSE4_1" > - [(set (match_dup 0) > - (umin:V2HI (match_dup 1) (match_dup 2))) > - (set (match_dup 0) > - (eq:V2HI (match_dup 0) (match_dup 2)))]) >=20 > the splitter is wrong when op1 =3D=3D op2.(the original pattern returns 0= , after > splitter, it returns 1) > So remove the splitter. Thank you for having a look. I have other testcases, possibly related, that= are being reduced now, failing at -O2 only; so -msse4.2 might not be the only broken target. I will open a new PR if those will still be broken after thi= s is fixed; alternatively, I can upload the testcases here, once they are reduce= d.=