From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D88C382164D; Tue, 4 Jun 2024 07:00:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D88C382164D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717484432; bh=1u2fhfx4jqi/thI4IvSiMRRaN7F+a41AgqBM4ykTwbA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PsjYrXnVQVGkG7WsDfR5yxCmoB/k8QkNWucUvzIZwvFua0p44TuJjq3UYPq3ws1q6 GJa6JvO6oWujgoqaJmpyqeyvksKQPMHX1jeWTeb452uiXnyFWBhjLzhGRli23AE+TD xQHeBRzhK/3NFs0MCwjW15XNz/aOgkedFJJ4hQtU= From: "syq at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111376] missed optimization of one bit test on MIPS32r1 Date: Tue, 04 Jun 2024 07:00:32 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: syq at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: syq 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=3D111376 --- Comment #2 from YunQiang Su --- (In reply to YunQiang Su from comment #1) > RISC-V has this problem, too. > Maybe we can try to combine it in `combine` pass, while it may be not eas= y. > It may break some code like: >=20 > ``` > int f1(); > int f2(); >=20 > int f(int a) { > int p =3D (a & 0x80000); > if (p) > return p; > else > return f2(); > } > ``` >=20 > And in fact your patch also break it. Ohh, this comment is not correct....=