From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 502493826FC7; Thu, 15 Sep 2022 15:54:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 502493826FC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663257248; bh=ESBbGyO8HnAaApn9P74VJFHKykHIYj4LFQK2CApjIHI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Sh/JqtG3+aH81MLlZkkkJGn8dxikLqfXjCRssMmRoMRyWkW9loW9Rz0+XDnaNGIaK FsksO70V4s8Ja9qnUiYt4CHFZYI4MtT4W3VganV6EbSxZ+KB27ADZ777bPgJ77kIej NminqozzTcnJuxIUv15nk7mlHIb4hV/leiB9tgwM= From: "tavianator at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106952] Missed optimization: x < y ? x : y not lowered to minss Date: Thu, 15 Sep 2022 15:54:08 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: tavianator 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=3D106952 --- Comment #2 from Tavian Barnes --- (In reply to Alexander Monakov from comment #1) > Note, your 'max' function is the same as 'min' (the issue remains with th= at > corrected). Whoops, thanks. Also I just noticed that GCC 12.2 does better (but not perfect) with=20 #define min(x, y) ((x) < (y) ? (x) : (y)) #define max(x, y) ((x) > (y) ? (x) : (y)) instead of the inline functions. Doesn't seem to help GCC trunk though.=